Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -155,4 +155,9 @@ public class CommonConstants {
|
||||
public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786";
|
||||
|
||||
|
||||
//开业运营方案审核0通过
|
||||
public static final Byte opening_Operation_Plan_PASS = Byte.valueOf((byte)0);
|
||||
//开业运营方案审核1拒绝
|
||||
public static final Byte opening_Operation_Plan_REJECT = Byte.valueOf((byte)1);
|
||||
public static final int MAX_LENGTH_ONE_HUNDRED = 100;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,18 @@ public enum ErrorCodeEnum {
|
||||
|
||||
LICENSE_NOT_EXIST(109006, "证照不存在",null),
|
||||
|
||||
|
||||
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
|
||||
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
|
||||
SHOP_ID_IS_NULL(103003,"验参shopId失败,为空",null),
|
||||
ACTIVITY_THEME_LENGTH_FALSE(103004,"活动主题长度大于100",null),
|
||||
SURVEYRESULT_LENGTH_FALSE(103005,"调研结果长度大于100",null),
|
||||
ID_IS_NULL(103006,"验参Id失败,为空",null),
|
||||
UPDATE_AUDIT_PLAN_FALSE(103007,"修改AUDIT_PLAN失败",null),
|
||||
UPDATE_PLAN_FALSE(103008,"修改PLAN失败",null),
|
||||
UPDATE_SHOP_SUB_STAGE_STATUS_FALSE(103009,"修改开业运营方案阶段状态失败",null),
|
||||
SHOP_ID_NOT_EXIST(103010,"shopId不存在",null),
|
||||
FIRST_ORDER_PARAM_NULL(103020,"首批订货金参数为空",null),
|
||||
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/23/下午2:50
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum OpeningOperationPlanResultTypeEnum {
|
||||
WAIT_AUDIT(0,"待审核"),
|
||||
PASS_AUDIT(1,"审核通过"),
|
||||
REJECT_AUDIT(2,"审核未通过");
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
OpeningOperationPlanResultTypeEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午5:15
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum OpeningOperationPlanSourceEnum {
|
||||
NEW(0,"新增"),
|
||||
SYNCHRONIZATION(1,"同步");
|
||||
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
OpeningOperationPlanSourceEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午5:04
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum ShopAuditInfoDeletedEnum {
|
||||
NO_DELETED(0,"不删除"),
|
||||
DELETED(1,"删除");
|
||||
|
||||
private Byte code;
|
||||
private String desc;
|
||||
ShopAuditInfoDeletedEnum(Integer code, String desc) {
|
||||
this.code = code.byteValue();
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Byte getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.openPreparation.UserInfoDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.mapper.EnterpriseUserMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
@@ -124,4 +125,7 @@ public class EnterpriseUserDAO {
|
||||
}
|
||||
return enterpriseUserMapper.selectByInvestmentManager( investmentManager);
|
||||
}
|
||||
public List<UserInfoDTO> getNameByUserId(List<String> userIdList){
|
||||
return enterpriseUserMapper.selectNameByUserId(userIdList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import com.cool.store.mapper.FirstOrderMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午8:32
|
||||
* @Version 1.0
|
||||
* @注释:首批订货金
|
||||
*/
|
||||
@Repository
|
||||
public class FirstOrderDAO {
|
||||
|
||||
@Resource
|
||||
private FirstOrderMapper firstOrderMapper;
|
||||
|
||||
public Integer insertFirstOrder(FirstOrderDO firstOrderDO) {
|
||||
return firstOrderMapper.insertSelective(firstOrderDO);
|
||||
}
|
||||
|
||||
public FirstOrderDTO selectFirstOrderByShopId(Long shopId) {
|
||||
return firstOrderMapper.selectByShopId(shopId);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.PendingCountDTO;
|
||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -12,14 +12,11 @@ import com.cool.store.request.LineListRequest;
|
||||
import com.cool.store.request.PartnerRequest;
|
||||
import com.cool.store.request.PointLinePageRequest;
|
||||
import com.cool.store.request.PublicLineListRequest;
|
||||
import com.cool.store.vo.PublicLineListVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -147,4 +144,7 @@ public class LineInfoDAO {
|
||||
PendingCountDTO pendingCount = lineInfoMapper.pendingCount(userId);
|
||||
return pendingCount;
|
||||
}
|
||||
public List<PlanLineDTO> getLines(List<Long> lineIdList){
|
||||
return lineInfoMapper.getLines(lineIdList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.NewStoreOpeningDO;
|
||||
import com.cool.store.mapper.NewStoreOpeningMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-24 14:33
|
||||
*/
|
||||
@Repository
|
||||
public class NewStoreOpeningDAO {
|
||||
|
||||
@Resource
|
||||
private NewStoreOpeningMapper newStoreOpeningMapper;
|
||||
|
||||
public List<NewStoreOpeningDO> storeTodoList(Long shopId) {
|
||||
return newStoreOpeningMapper.select(NewStoreOpeningDO.builder().shopId(shopId).build());
|
||||
}
|
||||
|
||||
public int insertSelective(NewStoreOpeningDO newStoreOpeningDO) {
|
||||
return newStoreOpeningMapper.insertSelective(newStoreOpeningDO);
|
||||
}
|
||||
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return newStoreOpeningMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.mapper.OpeningOperationPlanMapper;
|
||||
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午2:47
|
||||
* @Version 1.0
|
||||
* @注释:开业运营方案审核
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class OpeningOperationPlanAuditDAO {
|
||||
|
||||
@Resource
|
||||
private ShopAuditInfoMapper shopAuditInfoMapper;
|
||||
@Resource
|
||||
private OpeningOperationPlanMapper openingOperationPlanMapper;
|
||||
|
||||
public Long insertSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
return shopAuditInfoDO.getId();
|
||||
}
|
||||
public Integer updateSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
public Byte selectByShopId(Long shopId) {
|
||||
return shopAuditInfoMapper.selectAuditResultByShopId(shopId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.openPreparation.OpeningOperationPlanDTO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.mapper.OpeningOperationPlanMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午2:14
|
||||
* @Version 1.0
|
||||
* @注释:开业运营方案
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class OpeningOperationPlanDAO {
|
||||
|
||||
@Resource
|
||||
private OpeningOperationPlanMapper openingOperationPlanMapper;
|
||||
|
||||
public Long insertSelective(@Param("openingOperationPlanDO") OpeningOperationPlanDO openingOperationPlanDO){
|
||||
openingOperationPlanMapper.insertSelective(openingOperationPlanDO);
|
||||
return openingOperationPlanDO.getId();
|
||||
}
|
||||
|
||||
public OpeningOperationPlanDO selectById(Long Id){
|
||||
return openingOperationPlanMapper.selectByPrimaryKey(Id);
|
||||
}
|
||||
|
||||
public Long updateSelective( OpeningOperationPlanDO openingOperationPlanDO){
|
||||
openingOperationPlanMapper.updateByPrimaryKeySelective(openingOperationPlanDO);
|
||||
return openingOperationPlanDO.getId();
|
||||
}
|
||||
|
||||
public OpeningOperationPlanDO selectByShopId( Long shopId){
|
||||
return openingOperationPlanMapper.selectByShopId(shopId);
|
||||
}
|
||||
//条件关联查询
|
||||
public List<OpeningOperationPlanDTO> selectConditionPlanList(List<Long> shopIdList, OpeningOperationPlanDTO openingOperationPlanDTO){
|
||||
return openingOperationPlanMapper.selectPlanListByShopId(shopIdList, openingOperationPlanDTO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.utils.NumberConverter;
|
||||
import com.cool.store.vo.shop.StageShopCountVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -128,4 +129,14 @@ public class ShopInfoDAO {
|
||||
}
|
||||
return shopInfoMapper.getShopListByIds(shopIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/24
|
||||
* @description: 开业运营方案,根据shopname获取列表
|
||||
*/
|
||||
public Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(String shopName, String bigName, String fightName, Integer pageNum, Integer pageSize){
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
return shopInfoMapper.getOpenPlanShopListByShopName(shopName,bigName,fightName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.openPreparation.UserInfoDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -69,4 +70,10 @@ public interface EnterpriseUserMapper {
|
||||
EnterpriseUserDO selectByMobile( @Param("mobile") String mobile);
|
||||
|
||||
EnterpriseUserDO selectByInvestmentManager( @Param("investmentManager") String investmentManager);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/24
|
||||
* @description: 根据userid查询名字
|
||||
*/
|
||||
List<UserInfoDTO> selectNameByUserId(@Param("userIdList") List<String> userId);
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface FirstOrderMapper extends Mapper<FirstOrderDO> {
|
||||
|
||||
FirstOrderDTO selectByShopId (@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.PendingCountDTO;
|
||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.request.LineListRequest;
|
||||
import com.cool.store.request.PartnerRequest;
|
||||
import com.cool.store.request.PointLinePageRequest;
|
||||
@@ -85,4 +85,11 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
Page<LineInfoDO> getLinePageByDevelopmentManager(@Param("request") PointLinePageRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description: 开业运营方案根据line id join enterprise_user 查询
|
||||
*/
|
||||
List<PlanLineDTO> getLines(@Param("lineIdList") List<Long> lineIdList);
|
||||
}
|
||||
@@ -1,7 +1,17 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.openPreparation.OpeningOperationPlanDTO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OpeningOperationPlanMapper extends Mapper<OpeningOperationPlanDO> {
|
||||
|
||||
OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
List<OpeningOperationPlanDTO> selectPlanListByShopId(@Param("shopId") List<Long> shopId,
|
||||
@Param("openingOperationPlanDTO") OpeningOperationPlanDTO openingOperationPlanDTO );
|
||||
|
||||
}
|
||||
@@ -10,4 +10,10 @@ public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
||||
ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId);
|
||||
|
||||
List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description:根据店铺id查询审批结果
|
||||
*/
|
||||
Byte selectAuditResultByShopId(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.vo.shop.StageShopCountVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
@@ -60,4 +62,11 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
List<ShopInfoDO> getShopListByIds(@Param("shopIds")List<Long> shopIds);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/24
|
||||
* @description: 开业运营方案,根据shopname获取列表
|
||||
*/
|
||||
Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopName") String shopName,
|
||||
@Param("bigName") String bigName, @Param("fightName") String fightName);
|
||||
}
|
||||
@@ -132,5 +132,15 @@
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM enterprise_user_${enterpriseId} WHERE ( mobile = #{investmentManager} or `name` = #{investmentManager} ) and active = true LIMIT 1
|
||||
</select>
|
||||
<select id="selectNameByUserId" resultType="com.cool.store.dto.openPreparation.UserInfoDTO">
|
||||
select user_id as userId ,name ,
|
||||
from enterprise_user_${enterpriseId}
|
||||
where user_id in
|
||||
<foreach item="userId" index="index" collection="userIdList" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -16,4 +16,11 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<select id="selectByShopId" resultType="com.cool.store.dto.openPreparation.FirstOrderDTO">
|
||||
select total_order_deposit as totalOrderDeposit,latest_payment_date as latestPaymentDate
|
||||
estimated_cost as estimatedCost ,fruits_cost as fruitsCost
|
||||
from xfsg_first_order
|
||||
where shop_id = #{shopId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -479,5 +479,19 @@
|
||||
and (username like #{request.keyword} or mobile like #{request.keyword})
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLines" resultType="com.cool.store.dto.openPreparation.PlanLineDTO">
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username, eu.name as name
|
||||
from xfsg_line_info xli
|
||||
join enterprise_user_${enterpriseId} eu on xli.investment_manager = eu.user_id
|
||||
where deleted = 0 and join_status = 1 and line_status = 1
|
||||
<if test=" lineIdList != null and lineIdList.size>0">
|
||||
and id in
|
||||
<foreach collection="lineIdList" item="lineId" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -33,7 +33,7 @@
|
||||
o.id AS openAcceptanceInfoId,
|
||||
s.id AS shopId,
|
||||
s.shop_name AS shopName,
|
||||
s.shop_code AS shopCode,
|
||||
s.store_num AS storeNum,
|
||||
s.shop_manager_user_id AS shopManagerUserId,
|
||||
s.supervisor_user_id AS supervisorUserId,
|
||||
l.username AS partnerName,
|
||||
|
||||
@@ -22,5 +22,39 @@
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
|
||||
<result column="result_type" jdbcType="TINYINT" property="resultType"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
shop_id,plan_source,submitted_user_id,submission_time,survey_result,survey_result_url,activity_theme,activity_theme_url,preparation_user_ids,
|
||||
route_completed,deleted,audit_id,result_type
|
||||
</sql>
|
||||
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.OpeningOperationPlanDO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
xfsg_opening_operation_plan
|
||||
where shop_id = #{shopId}
|
||||
and
|
||||
deleted = 0
|
||||
</select>
|
||||
<select id="selectPlanListByShopId" resultType="com.cool.store.dto.openPreparation.OpeningOperationPlanDTO">
|
||||
SELECT op.shop_id AS shopId, op.update_time AS updateTime, op.result_type AS resultType
|
||||
FROM xfsg_opening_operation_plan op
|
||||
JOIN xfsg_shop_info si ON op.shop_id = si.id
|
||||
where
|
||||
<if test="shopId != null and shopId.size >0 ">
|
||||
<foreach item="shopId" index="index" collection="shopIdList" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="openingOperationPlanDTO.planStartDate != null">
|
||||
AND DATE(op.create_time) >= #{openingOperationPlanDTO.planStartDate}
|
||||
</if>
|
||||
<if test="openingOperationPlanDTO.planEndDate != null">
|
||||
<![CDATA[AND DATE(op.create_time) <= #{openingOperationPlanDTO.planEndDate}]]>
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -35,4 +35,16 @@
|
||||
#{auditId}
|
||||
</foreach>
|
||||
</select>
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,audit_type,submitted_user_id,submitted_user_name,result_type,pass_reason,reject_reason,
|
||||
certify_file,create_time,update_time,deleted
|
||||
</sql>
|
||||
<select id="selectAuditResultByShopId" resultType="java.lang.Byte">
|
||||
select
|
||||
result_type
|
||||
from
|
||||
xfsg_shop_audit_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -72,5 +72,26 @@
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getOpenPlanShopListByShopName" resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
|
||||
select si.id as shopId, si.line_id as lineId, si.shop_name as shopName,
|
||||
si.shop_code as shopCode, si.shop_manager_user_id as shopManagerUserId,si.shop_manager_user_id as shopManagerUserId
|
||||
xsbs.big_name as bigName, xsbs.fight_name as fightName
|
||||
from xfsg_shop_info si
|
||||
join xfsg_line_info li on si.line_id = li.id
|
||||
join xfsg_system_building_shop xsbs on si.id = xsbs.big_name
|
||||
where 1=1
|
||||
<if test="shopName != null and shopName != ''">
|
||||
AND si.shop_name = #{shopName}
|
||||
</if>
|
||||
<if test="bigName != null and bigName != ''">
|
||||
AND xsbs.big_name = #{bigName}
|
||||
</if>
|
||||
<if test="fightName != null and fightName != ''">
|
||||
AND xsbs.fight_name = #{fightName}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,12 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<component name="AdditionalModuleElements">
|
||||
<content url="file://$MODULE_DIR$" dumb="true">
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.dto.openPreparation;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午8:42
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class FirstOrderDTO {
|
||||
|
||||
@ApiModelProperty("店铺Id")
|
||||
private Long shopId;
|
||||
@ApiModelProperty("首批订货金总额")
|
||||
private String totalOrderDeposit;
|
||||
@ApiModelProperty("最晚打款时间")
|
||||
private Date latestPaymentDate;
|
||||
|
||||
@ApiModelProperty("物料预计费用")
|
||||
private String estimatedCost;
|
||||
|
||||
@ApiModelProperty("水果预计费用")
|
||||
private String fruitsCost;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUserId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.dto.openPreparation;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/上午9:53
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class OpenPlanShopInfoDTO {
|
||||
|
||||
@ApiModelProperty("店铺Id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("门店名字")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("门店代码")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("开店负责人id")
|
||||
private String shopManagerUserId;
|
||||
|
||||
@ApiModelProperty("督导id")
|
||||
private String supervisorUserId;
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("招商经理id")
|
||||
private String investmentManagerId;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private String bigName;
|
||||
|
||||
@ApiModelProperty("所属战区")
|
||||
private String fightName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.dto.openPreparation;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/23/下午10:09
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class OpeningOperationPlanDTO {
|
||||
|
||||
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("门店代码")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("开店负责人")
|
||||
private String shopManagerUserId;
|
||||
|
||||
@ApiModelProperty("提交申请时间")
|
||||
private Date submissionTime;
|
||||
|
||||
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
||||
private String resultType;
|
||||
|
||||
@ApiModelProperty("起始日期")
|
||||
public LocalDate planStartDate;
|
||||
|
||||
@ApiModelProperty("结束日期")
|
||||
public LocalDate planEndDate;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.dto.openPreparation;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午5:07
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class PlanLineDTO {
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
private String mobile;
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("招商经理姓名")
|
||||
private String investmentManagerName;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.dto.openPreparation;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/上午11:42
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
|
||||
public class UserInfoDTO {
|
||||
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public class LineInfoDO {
|
||||
private Integer joinStatus;
|
||||
|
||||
/**
|
||||
* 0.公海 1.私海 2黑名单
|
||||
* 0.公海 1.私海 2.黑名单
|
||||
*/
|
||||
@Column(name = "line_status")
|
||||
private Integer lineStatus;
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table(name = "xfsg_new_store_opening")
|
||||
public class NewStoreOpeningDO {
|
||||
@Id
|
||||
@@ -38,108 +47,4 @@ public class NewStoreOpeningDO {
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取line_info.id
|
||||
*
|
||||
* @return shop_id - line_info.id
|
||||
*/
|
||||
public Long getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置line_info.id
|
||||
*
|
||||
* @param shopId line_info.id
|
||||
*/
|
||||
public void setShopId(Long shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待办事项
|
||||
*
|
||||
* @return todo_item - 待办事项
|
||||
*/
|
||||
public String getTodoItem() {
|
||||
return todoItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置待办事项
|
||||
*
|
||||
* @param todoItem 待办事项
|
||||
*/
|
||||
public void setTodoItem(String todoItem) {
|
||||
this.todoItem = todoItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取完成时间
|
||||
*
|
||||
* @return completion_time - 完成时间
|
||||
*/
|
||||
public Date getCompletionTime() {
|
||||
return completionTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置完成时间
|
||||
*
|
||||
* @param completionTime 完成时间
|
||||
*/
|
||||
public void setCompletionTime(Date completionTime) {
|
||||
this.completionTime = completionTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*
|
||||
* @return create_time - 创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*
|
||||
* @param createTime 创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*
|
||||
* @return update_time - 更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*
|
||||
* @param updateTime 更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
@@ -104,6 +104,26 @@ public class OpeningOperationPlanDO {
|
||||
@Column(name = "audit_id")
|
||||
private Long auditId;
|
||||
|
||||
public Integer getResultType() {
|
||||
return resultType;
|
||||
}
|
||||
|
||||
public void setResultType(Integer resultType) {
|
||||
this.resultType = resultType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核结果状态:0.待审核 1. 通过 2. 拒绝
|
||||
*/
|
||||
@Column(name = "result_type")
|
||||
private Integer resultType;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return id
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午9:12
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class FirstOrderRequest {
|
||||
|
||||
@ApiModelProperty("店铺Id")
|
||||
private Long shopId;
|
||||
@ApiModelProperty("首批订货金总额")
|
||||
private String totalOrderDeposit;
|
||||
@ApiModelProperty("最晚打款时间")
|
||||
private Date latestPaymentDate;
|
||||
|
||||
@ApiModelProperty("物料预计费用")
|
||||
private String estimatedCost;
|
||||
|
||||
@ApiModelProperty("水果预计费用")
|
||||
private String fruitsCost;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-24 16:40
|
||||
*/
|
||||
@Data
|
||||
public class IdRequest {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
*/
|
||||
@Data
|
||||
public class NewStoreOpeningRequest {
|
||||
/**
|
||||
* line_info.id
|
||||
*/
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 待办事项
|
||||
*/
|
||||
@ApiModelProperty("待办事项")
|
||||
private String todoItem;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@ApiModelProperty("完成时间")
|
||||
private Date completionTime;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午3:52
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class OpeningOperationPlanAuditRequest {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("2-开业运营方案")
|
||||
private Integer auditType;
|
||||
|
||||
@ApiModelProperty("提交人ID")
|
||||
private String submittedUserId;
|
||||
|
||||
@ApiModelProperty("提交人名称")
|
||||
private String submittedUserName;
|
||||
|
||||
@ApiModelProperty("结果类型 0通过,1拒绝")
|
||||
private Integer resultType;
|
||||
|
||||
@ApiModelProperty("通过原因")
|
||||
private String passReason;
|
||||
|
||||
@ApiModelProperty("拒绝原因")
|
||||
private String rejectReason;
|
||||
|
||||
@ApiModelProperty("是否删除:0.否 1.是")
|
||||
private Boolean deleted;
|
||||
|
||||
public ShopAuditInfoDO toShopAuditInfoDO() {
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setId(id);
|
||||
shopAuditInfoDO.setShopId(shopId);
|
||||
shopAuditInfoDO.setAuditType(auditType);
|
||||
shopAuditInfoDO.setResultType(resultType);
|
||||
shopAuditInfoDO.setPassReason(passReason);
|
||||
shopAuditInfoDO.setRejectReason(rejectReason);
|
||||
shopAuditInfoDO.setDeleted(deleted);
|
||||
shopAuditInfoDO.setSubmittedUserId(submittedUserId);
|
||||
shopAuditInfoDO.setSubmittedUserName(submittedUserName);
|
||||
shopAuditInfoDO.setCreateTime(new Date());
|
||||
shopAuditInfoDO.setUpdateTime(new Date());
|
||||
return shopAuditInfoDO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/19/下午7:32
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class OpeningOperationPlanRequest {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("0-新增/1-同步")
|
||||
private Boolean planSource;
|
||||
|
||||
@ApiModelProperty("调研结果")
|
||||
private String surveyResult;
|
||||
|
||||
@ApiModelProperty("调研结果url")
|
||||
private String surveyResultUrl;
|
||||
|
||||
@ApiModelProperty("活动主题")
|
||||
private String activityTheme;
|
||||
|
||||
@ApiModelProperty("活动主题url")
|
||||
private String activityThemeUrl;
|
||||
|
||||
@ApiModelProperty("筹备人员ids")
|
||||
private String preparationUserIds;
|
||||
|
||||
@ApiModelProperty("是否完成排车路线")
|
||||
private Byte routeCompleted;
|
||||
|
||||
@ApiModelProperty("是否删除:0.否 1.是")
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
||||
private Integer resultType;
|
||||
|
||||
|
||||
|
||||
public OpeningOperationPlanDO toOpeningOperationPlanDO() {
|
||||
OpeningOperationPlanDO openingOperationPlanDO = new OpeningOperationPlanDO();
|
||||
openingOperationPlanDO.setShopId(shopId);
|
||||
openingOperationPlanDO.setPlanSource(planSource);
|
||||
openingOperationPlanDO.setSurveyResult(surveyResult);
|
||||
openingOperationPlanDO.setSurveyResultUrl(surveyResultUrl);
|
||||
openingOperationPlanDO.setActivityTheme(activityTheme);
|
||||
openingOperationPlanDO.setActivityThemeUrl(activityThemeUrl);
|
||||
openingOperationPlanDO.setPreparationUserIds(preparationUserIds);
|
||||
openingOperationPlanDO.setRouteCompleted(routeCompleted);
|
||||
openingOperationPlanDO.setDeleted(deleted);
|
||||
openingOperationPlanDO.setResultType(resultType);
|
||||
return openingOperationPlanDO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午2:06
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class PlanListRequest {
|
||||
@ApiModelProperty("店铺名称")
|
||||
private String shopName;
|
||||
@ApiModelProperty("起始日期")
|
||||
private LocalDate planStartDate;
|
||||
@ApiModelProperty("结束日期")
|
||||
private LocalDate planEndDate;
|
||||
@ApiModelProperty("大区名称")
|
||||
private String bigName;
|
||||
@ApiModelProperty("战区名称")
|
||||
private String fightName;
|
||||
@ApiModelProperty("分页数据量")
|
||||
private Integer pageNum;
|
||||
@ApiModelProperty("页数")
|
||||
private Integer pageSize;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
*/
|
||||
@Data
|
||||
public class NewStoreOpeningVO {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* line_info.id
|
||||
*/
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 待办事项
|
||||
*/
|
||||
@ApiModelProperty("待办事项")
|
||||
private String todoItem;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@ApiModelProperty("完成时间")
|
||||
private Date completionTime;
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class OpenAcceptanceInfoListVO {
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
@ApiModelProperty("门店代码")
|
||||
private String shopCode;
|
||||
private String storeNum;
|
||||
@ApiModelProperty("开店负责人id")
|
||||
private String shopManagerUserId;
|
||||
@ApiModelProperty("开店负责人名称")
|
||||
@@ -46,6 +46,8 @@ public class OpenAcceptanceInfoListVO {
|
||||
private String largeRegionName;
|
||||
@ApiModelProperty("计划开业时间")
|
||||
private Date planOpenTime;
|
||||
@ApiModelProperty("新店开业结束时间")
|
||||
private Date planOpenEndTime;
|
||||
@ApiModelProperty("验收状态 0:未验收 1:已验收")
|
||||
private String acceptanceStatus;
|
||||
@ApiModelProperty("招商经理id")
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/23/上午10:47
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class OpeningOperationPlanListVO {
|
||||
|
||||
@ApiModelProperty("门店id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("门店代码")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("开店负责人")
|
||||
private String shopManagerName;
|
||||
|
||||
@ApiModelProperty("开店负责人id")
|
||||
private String shopManagerUserId;
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private String bigName;
|
||||
|
||||
@ApiModelProperty("所属战区")
|
||||
private String fightName;
|
||||
|
||||
@ApiModelProperty("招商经理名字")
|
||||
private String investmentManagerName;
|
||||
|
||||
@ApiModelProperty("督导id")
|
||||
private String supervisorUserId;
|
||||
|
||||
@ApiModelProperty("督导")
|
||||
private String supervisorName;
|
||||
|
||||
@ApiModelProperty("提交申请时间")
|
||||
private Date submissionTime;
|
||||
|
||||
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
||||
private String resultType;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午7:58
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class OpeningOperationPlanVO {
|
||||
|
||||
@ApiModelProperty("调研结果")
|
||||
private String surveyResult;
|
||||
|
||||
@ApiModelProperty("调研结果url")
|
||||
private String surveyResultUrl;
|
||||
|
||||
@ApiModelProperty("活动主题")
|
||||
private String activityTheme;
|
||||
|
||||
@ApiModelProperty("活动主题url")
|
||||
private String activityThemeUrl;
|
||||
|
||||
@ApiModelProperty("筹备人员ids")
|
||||
private String preparationUsers;
|
||||
|
||||
@ApiModelProperty("是否完成排车路线")
|
||||
private Byte routeCompleted;
|
||||
|
||||
@ApiModelProperty("提交时间")
|
||||
private Date submissionTime;
|
||||
|
||||
@ApiModelProperty("提交人")
|
||||
private String submittedUserId;
|
||||
|
||||
@ApiModelProperty("通过原因")
|
||||
private String passReason;
|
||||
|
||||
@ApiModelProperty("审核结果,0待审核,1通过,2拒绝")
|
||||
private String resultType;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
*/
|
||||
@Data
|
||||
public class ShopAcceptanceVO {
|
||||
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("开业时间")
|
||||
private Date planOpenTime;
|
||||
|
||||
/**
|
||||
* 验收状态
|
||||
*/
|
||||
@ApiModelProperty("验收状态 0:验收中 1:已验收")
|
||||
private Integer acceptanceStatus;
|
||||
|
||||
@ApiModelProperty("店铺子阶段验收结果")
|
||||
private List<ShopStageAcceptanceVO> shopStageAcceptanceList;
|
||||
|
||||
}
|
||||
@@ -25,6 +25,18 @@ public interface CoolStoreStartFlowService {
|
||||
* @return
|
||||
*/
|
||||
ResponseResult franchiseAgreement(FranchiseAgreementRequest request,Integer type);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:项目列表
|
||||
*/
|
||||
ResponseResult getProjectList(String shopCode);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:项目详情
|
||||
* @Param projectId:项目主键,clientCode:客户编号,pCode:项目编号
|
||||
*/
|
||||
ResponseResult getStoreDetail(Long projectId,String clientCode,String pCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午8:52
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface FirstOrderService {
|
||||
|
||||
Integer saveOrder(FirstOrderDO order);
|
||||
|
||||
FirstOrderDTO getOrder(Long shopId);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.NewStoreOpeningRequest;
|
||||
import com.cool.store.vo.NewStoreOpeningVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-24 14:32
|
||||
*/
|
||||
public interface NewStoreOpeningService {
|
||||
|
||||
List<NewStoreOpeningVO> storeTodoList(Long shopId);
|
||||
|
||||
void addStoreTodo(NewStoreOpeningRequest newStoreOpeningRequest);
|
||||
|
||||
void removeStoreTodo(Long id);
|
||||
}
|
||||
@@ -3,11 +3,9 @@ package com.cool.store.service;
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||
import com.cool.store.vo.ShopAcceptanceVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-22 14:41
|
||||
@@ -26,7 +24,7 @@ public interface OpenAcceptanceInfoService {
|
||||
* @param shopId 店铺id
|
||||
* @return
|
||||
*/
|
||||
List<ShopStageAcceptanceVO> acceptanceStageList(Long shopId);
|
||||
ShopAcceptanceVO acceptanceStageList(Long shopId);
|
||||
|
||||
/**
|
||||
* 验收
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午3:19
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface OpeningOperationPlanAuditService {
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/22
|
||||
* @description: 提交方案至审核表
|
||||
*/
|
||||
Long addNewPlanAudit(OpeningOperationPlanAuditRequest openingOperationPlanAuditRequest);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description:审核方案
|
||||
*/
|
||||
Boolean auditPlan(OpeningOperationPlanAuditRequest openingOperationPlanAuditRequest);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.OpeningOperationPlanRequest;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午3:10
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface OpeningOperationPlanService {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description: 提交开业运营方案
|
||||
*/
|
||||
Long savePlan(OpeningOperationPlanRequest openingOperationPlanRequest);
|
||||
|
||||
OpeningOperationPlanVO getPlanById(Long ShopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description: 根据条件查询方案列表
|
||||
*/
|
||||
List<OpeningOperationPlanListVO> getPlanListPage(PlanListRequest request);
|
||||
|
||||
}
|
||||
@@ -74,6 +74,57 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult getProjectList(String shopCode) {
|
||||
log.info("getProjectList param:{}", shopCode);
|
||||
if (Objects.isNull(shopCode)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
String url = String.format(Constants.GET_PROJECT_LIST, shopCode);
|
||||
log.info("CoolStoreStartFlowServiceImpl#getOrder, url:{}",url);
|
||||
try {
|
||||
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
||||
log.info("CoolStoreStartFlowServiceImpl#getOrder,jsonObject:{}",jsonObject.toJSONString());
|
||||
if (jsonObject.get("status").equals(Constants.SUCCESS)) {
|
||||
return new ResponseResult(200,jsonObject.get("data").toString(),jsonObject.get("msg").toString());
|
||||
}else
|
||||
{
|
||||
return new ResponseResult(500,jsonObject.get("msg").toString());
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.info("调用鲜丰服务异常,getProjectList error:{}",e);
|
||||
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseResult getStoreDetail(Long projectId, String clientCode, String pCode) {
|
||||
log.info("getStoreList projectId:{},clientCode:{},pCode:{}", projectId,clientCode,pCode);
|
||||
if (Objects.isNull(projectId)&&Objects.isNull(clientCode)&&Objects.isNull(pCode)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
HashMap requestMap = new HashMap();
|
||||
requestMap.put("projectId", projectId);
|
||||
requestMap.put("clientCode", clientCode);
|
||||
requestMap.put("pCode", pCode);
|
||||
try {
|
||||
JSONObject jsonObject = httpRestTemplateService.getForObject(Constants.GET_PROJECT_DETAIL, JSONObject.class, requestMap);
|
||||
log.info("FirstOrderServiceImp#getStoreDetail, jsonObject:{}",jsonObject.toJSONString());
|
||||
if (jsonObject.get("status").equals(Constants.SUCCESS)) {
|
||||
return new ResponseResult(200,jsonObject.get("data").toString(),jsonObject.get("msg").toString());
|
||||
}else
|
||||
{
|
||||
return new ResponseResult(500,jsonObject.get("msg").toString());
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.info("调用鲜丰服务异常,getProjectList error:{}",e);
|
||||
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||
long timestamp = System.currentTimeMillis();
|
||||
String signature = SecureUtil.getSignature(timestamp);
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dao.FirstOrderDAO;
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.FirstOrderService;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午8:53
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class FirstOrderServiceImp implements FirstOrderService {
|
||||
@Resource
|
||||
private FirstOrderDAO firstOrderDAO;
|
||||
|
||||
@Resource
|
||||
CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
@Override
|
||||
public Integer saveOrder(FirstOrderDO order) {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
log.info("save order:{}",order);
|
||||
if (order == null ) {
|
||||
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
|
||||
}
|
||||
FirstOrderDTO firstOrderDTO = firstOrderDAO.selectFirstOrderByShopId(order.getShopId());
|
||||
if (firstOrderDTO == null) {
|
||||
order.setCreateTime(new Date());
|
||||
order.setUpdateTime(new Date());
|
||||
order.setCreateUserId(userId);
|
||||
order.setUpdateUserId(userId);
|
||||
} else {
|
||||
order.setUpdateTime(new Date());
|
||||
order.setUpdateUserId(userId);
|
||||
}
|
||||
return firstOrderDAO.insertFirstOrder(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FirstOrderDTO getOrder(Long shopId) {
|
||||
log.info("get order:{}",shopId);
|
||||
if (shopId == null) {
|
||||
log.error("shopId is null");
|
||||
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
|
||||
}
|
||||
return firstOrderDAO.selectFirstOrderByShopId(shopId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.NewStoreOpeningDAO;
|
||||
import com.cool.store.entity.NewStoreOpeningDO;
|
||||
import com.cool.store.request.NewStoreOpeningRequest;
|
||||
import com.cool.store.service.NewStoreOpeningService;
|
||||
import com.cool.store.vo.NewStoreOpeningVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author byd
|
||||
* @date 2024-04-24 14:32
|
||||
*/
|
||||
@Service
|
||||
public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
||||
|
||||
@Resource
|
||||
private NewStoreOpeningDAO newStoreOpeningDAO;
|
||||
|
||||
@Override
|
||||
public List<NewStoreOpeningVO> storeTodoList(Long shopId) {
|
||||
List<NewStoreOpeningDO> storeOpeningDOList = newStoreOpeningDAO.storeTodoList(shopId);
|
||||
List<NewStoreOpeningVO> resultList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(storeOpeningDOList)){
|
||||
storeOpeningDOList.forEach(storeOpeningDO -> {
|
||||
NewStoreOpeningVO newStoreOpeningVO = new NewStoreOpeningVO();
|
||||
newStoreOpeningVO.setId(storeOpeningDO.getId());
|
||||
newStoreOpeningVO.setShopId(storeOpeningDO.getShopId());
|
||||
newStoreOpeningVO.setCompletionTime(storeOpeningDO.getCompletionTime());
|
||||
newStoreOpeningVO.setTodoItem(storeOpeningDO.getTodoItem());
|
||||
resultList.add(newStoreOpeningVO);
|
||||
});
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addStoreTodo(NewStoreOpeningRequest newStoreOpeningRequest) {
|
||||
NewStoreOpeningDO newStoreOpeningDO = new NewStoreOpeningDO();
|
||||
newStoreOpeningDO.setShopId(newStoreOpeningRequest.getShopId());
|
||||
newStoreOpeningDO.setTodoItem(newStoreOpeningRequest.getTodoItem());
|
||||
newStoreOpeningDO.setCompletionTime(newStoreOpeningRequest.getCompletionTime());
|
||||
newStoreOpeningDAO.insertSelective(newStoreOpeningDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStoreTodo(Long id) {
|
||||
newStoreOpeningDAO.deleteByPrimaryKey(id);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.OpenAcceptanceInfoDAO;
|
||||
import com.cool.store.dao.RegionDao;
|
||||
@@ -15,7 +17,10 @@ import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
import com.cool.store.service.OpenAcceptanceInfoService;
|
||||
import com.cool.store.service.RegionService;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.cool.store.vo.ShopAcceptanceVO;
|
||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@@ -65,6 +70,9 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
||||
vo.setShopManagerUserName(userNameMap.get(vo.getShopManagerUserId()));
|
||||
vo.setAcceptanceUserName(userNameMap.get(vo.getAcceptanceUserId()));
|
||||
vo.setInvestmentManagerName(userNameMap.get(vo.getInvestmentManager()));
|
||||
if(vo.getPlanOpenTime() != null){
|
||||
vo.setPlanOpenEndTime(DateUtils.addDays(vo.getPlanOpenTime(), CommonConstants.THREE));
|
||||
}
|
||||
if (vo.getRegionId() != null) {
|
||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(vo.getRegionId());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, vo.getRegionId()));
|
||||
@@ -79,8 +87,7 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopStageAcceptanceVO> acceptanceStageList(Long shopId) {
|
||||
|
||||
public ShopAcceptanceVO acceptanceStageList(Long shopId) {
|
||||
List<ShopStageInfoDO> stageInfoDOList = shopStageInfoDAO.getShopStageInfo(shopId, ShopStageEnum.SHOP_STAGE_2.getShopStage());
|
||||
List<ShopStageAcceptanceVO> result = new ArrayList<>();
|
||||
OpenAcceptanceInfoDO openAcceptanceInfoDO = openAcceptanceInfoDAO.selectOne(OpenAcceptanceInfoDO.builder().shopId(shopId).build());
|
||||
@@ -101,7 +108,12 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
||||
}
|
||||
result.add(shopStageAcceptanceVO);
|
||||
});
|
||||
return result;
|
||||
ShopAcceptanceVO shopAcceptanceVO = new ShopAcceptanceVO();
|
||||
shopAcceptanceVO.setShopStageAcceptanceList(result);
|
||||
shopAcceptanceVO.setShopId(shopId);
|
||||
shopAcceptanceVO.setPlanOpenTime(openAcceptanceInfoDO.getPlanOpenTime());
|
||||
shopAcceptanceVO.setAcceptanceStatus(openAcceptanceInfoDO.getAcceptanceStatus());
|
||||
return shopAcceptanceVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dao.OpeningOperationPlanAuditDAO;
|
||||
import com.cool.store.dao.OpeningOperationPlanDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.OpeningOperationPlanResultTypeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
import com.cool.store.service.OpeningOperationPlanAuditService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午3:19
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditService {
|
||||
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanDAO openingOperationPlanDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Override
|
||||
public Long addNewPlanAudit(OpeningOperationPlanAuditRequest request) {
|
||||
log.info("addNewPlanAudit request:{}", request);
|
||||
ShopAuditInfoDO shopAuditInfoDO = request.toShopAuditInfoDO();
|
||||
return openingOperationPlanAuditDAO.insertSelective(shopAuditInfoDO);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean auditPlan(OpeningOperationPlanAuditRequest request) {
|
||||
log.info("auditPlan request:{}", request);
|
||||
if (Objects.isNull(request.getId()))
|
||||
{
|
||||
log.error("auditPlan request id is null");
|
||||
throw new ServiceException("auditPlan request id is null");
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
try{
|
||||
Integer audit = openingOperationPlanAuditDAO.updateSelective(request.toShopAuditInfoDO());
|
||||
if (Objects.isNull(audit)){
|
||||
log.error("auditPlan audit is null");
|
||||
throw new ServiceException(ErrorCodeEnum.UPDATE_AUDIT_PLAN_FALSE);
|
||||
}
|
||||
OpeningOperationPlanDO openingOperationPlanDO = new OpeningOperationPlanDO();
|
||||
openingOperationPlanDO.setUpdateUserId(userId);
|
||||
openingOperationPlanDO.setUpdateTime(new Date());
|
||||
openingOperationPlanDO.setResultType(request.getResultType());
|
||||
Long plan = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
|
||||
if (Objects.isNull(plan)){
|
||||
log.error("auditPlan plan is null");
|
||||
throw new ServiceException(ErrorCodeEnum.UPDATE_PLAN_FALSE);
|
||||
}
|
||||
|
||||
if (request.getResultType().equals(OpeningOperationPlanResultTypeEnum.PASS_AUDIT.getCode())){
|
||||
Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143, request.getShopId());
|
||||
if (Objects.isNull(Stage)){
|
||||
log.error("auditPlan stage is null");
|
||||
throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE);
|
||||
}
|
||||
}else {
|
||||
if (request.getResultType().equals(OpeningOperationPlanResultTypeEnum.REJECT_AUDIT.getCode())){
|
||||
Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142, request.getShopId());
|
||||
if (Objects.isNull(Stage)){
|
||||
log.error("auditPlan stage is null");
|
||||
throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
catch (Exception e) {
|
||||
log.error("auditPlan Exception:{}", e);
|
||||
e.printStackTrace();
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.dto.openPreparation.OpeningOperationPlanDTO;
|
||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.dto.openPreparation.UserInfoDTO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.enums.AuditTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
import com.cool.store.request.OpeningOperationPlanRequest;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import com.cool.store.service.OpeningOperationPlanAuditService;
|
||||
import com.cool.store.service.OpeningOperationPlanService;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午3:15
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
|
||||
@Resource
|
||||
private OpeningOperationPlanDAO openingOperationPlanDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long savePlan(OpeningOperationPlanRequest request) {
|
||||
log.info("addNewPlan request:{}", request);
|
||||
if (request.getActivityTheme().length() > CommonConstants.MAX_LENGTH_ONE_HUNDRED){
|
||||
log.error("addNewPlan ActivityTheme length error");
|
||||
throw new ServiceException(ErrorCodeEnum.ACTIVITY_THEME_LENGTH_FALSE);
|
||||
}
|
||||
if (request.getSurveyResult().length() >CommonConstants.MAX_LENGTH_ONE_HUNDRED){
|
||||
log.error("addNewPlan SurveyResult length error");
|
||||
throw new ServiceException(ErrorCodeEnum.SURVEYRESULT_LENGTH_FALSE);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
try {
|
||||
String userName = enterpriseUserDAO.getUserName(userId);
|
||||
if (StringUtils.isBlank(userName)){
|
||||
log.error("addNewPlan userName is null");
|
||||
throw new ServiceException(ErrorCodeEnum.USER_NOT_EXIST);
|
||||
}
|
||||
OpeningOperationPlanAuditRequest openingOperationPlanAuditRequest = new OpeningOperationPlanAuditRequest();
|
||||
openingOperationPlanAuditRequest.setShopId(request.getShopId());
|
||||
openingOperationPlanAuditRequest.setAuditType(AuditTypeEnum.OPENING_OPERATION_PLAN.getCode());
|
||||
openingOperationPlanAuditRequest.setSubmittedUserName(userName);
|
||||
openingOperationPlanAuditRequest.setSubmittedUserId(userId);
|
||||
Long AuditId = openingOperationPlanAuditService.addNewPlanAudit(openingOperationPlanAuditRequest);
|
||||
if (Objects.isNull(AuditId) ){
|
||||
log.error("addNewPlan AuditId is null");
|
||||
throw new ServiceException(ErrorCodeEnum.INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE);
|
||||
}
|
||||
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
|
||||
|
||||
Long planId ;
|
||||
if (Objects.isNull(selectByShopId)){
|
||||
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
|
||||
openingOperationPlanDO.setSubmissionTime(new Date());
|
||||
openingOperationPlanDO.setSubmittedUserId(userId);
|
||||
openingOperationPlanDO.setAuditId(AuditId);
|
||||
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
|
||||
}
|
||||
else {
|
||||
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
|
||||
openingOperationPlanDO.setSubmissionTime(new Date());
|
||||
openingOperationPlanDO.setSubmittedUserId(userId);
|
||||
openingOperationPlanDO.setCreateTime(new Date());
|
||||
openingOperationPlanDO.setCreateUserId(userId);
|
||||
openingOperationPlanDO.setAuditId(AuditId);
|
||||
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
|
||||
}
|
||||
if (Objects.isNull(planId)){
|
||||
log.error("addNewPlan PlanId is null");
|
||||
throw new ServiceException(ErrorCodeEnum.INSERT_OPENING_OPERATION_PLAN_FALSE);
|
||||
}
|
||||
Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141, request.getShopId());
|
||||
if (Objects.isNull(Stage)){
|
||||
log.error("auditPlan stage is null");
|
||||
throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE);
|
||||
}
|
||||
|
||||
return planId;
|
||||
}catch (Exception e) {
|
||||
log.error("addNewPlan Exception:{}", e);
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpeningOperationPlanVO getPlanById(Long Id) {
|
||||
log.info( "getPlanBy Id:{}", Id );
|
||||
if (Objects.isNull(Id)){
|
||||
log.error("getPlanBy Id is null");
|
||||
throw new ServiceException(ErrorCodeEnum.ID_IS_NULL);
|
||||
}
|
||||
OpeningOperationPlanVO openingOperationPlanVO = new OpeningOperationPlanVO();
|
||||
OpeningOperationPlanDO openingOperationPlanDO = openingOperationPlanDAO.selectById(Id);
|
||||
try {
|
||||
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
|
||||
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
|
||||
List<UserInfoDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(stream);
|
||||
List<String> names = nameByUserId.stream()
|
||||
.map(UserInfoDTO::getName)
|
||||
.collect(Collectors.toList());
|
||||
String preparationUserName = String.join(CommonConstants.COMMA, names);
|
||||
BeanUtils.copyProperties(openingOperationPlanDO, openingOperationPlanVO);
|
||||
openingOperationPlanVO.setPreparationUsers(preparationUserName);
|
||||
return openingOperationPlanVO;
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OpeningOperationPlanListVO> getPlanListPage(PlanListRequest request) {
|
||||
log.info("getPlanListPage request:{}", request);
|
||||
//根据ShopName等查询门店名字1,门店代码1,开店负责人1,督导id1
|
||||
Page<OpenPlanShopInfoDTO> openPlanShopList = shopInfoDAO.
|
||||
getOpenPlanShopListByShopName(request.getShopName(), request.getBigName(), request.getFightName(),
|
||||
request.getPageNum(), request.getPageSize());
|
||||
log.info("getPlanListPage openPlanShopList:{}", openPlanShopList);
|
||||
List<OpeningOperationPlanListVO> openingOperationPlanListVOList= openPlanShopList.stream().map(dto -> {
|
||||
OpeningOperationPlanListVO vO = new OpeningOperationPlanListVO();
|
||||
vO.setShopId(dto.getShopId());
|
||||
vO.setLineId(dto.getLineId());
|
||||
vO.setShopName(dto.getShopName());
|
||||
vO.setShopManagerUserId(dto.getShopManagerUserId());
|
||||
vO.setSupervisorUserId(dto.getSupervisorUserId());
|
||||
vO.setShopCode(dto.getShopCode());
|
||||
vO.setBigName(dto.getBigName());
|
||||
vO.setFightName(dto.getFightName());
|
||||
return vO;
|
||||
}).collect(Collectors.toList());
|
||||
log.info("getPlanListPage openingOperationPlanVOList:{}", openingOperationPlanListVOList);
|
||||
//提交时间,审核状态
|
||||
List<Long> shopIdList = openPlanShopList.stream()
|
||||
.map(OpenPlanShopInfoDTO::getShopId)
|
||||
.collect(Collectors.toList());
|
||||
OpeningOperationPlanDTO openingOperationPlanDTO =new OpeningOperationPlanDTO();
|
||||
openingOperationPlanDTO.setPlanStartDate(request.getPlanStartDate());
|
||||
openingOperationPlanDTO.setPlanEndDate(request.getPlanEndDate());
|
||||
List<OpeningOperationPlanDTO> openingOperationPlanDTOS = openingOperationPlanDAO.selectConditionPlanList(shopIdList, openingOperationPlanDTO);
|
||||
log.info("getPlanListPage openingOperationPlanDTOS:{}", openingOperationPlanDTOS);
|
||||
Map<Long, OpeningOperationPlanDTO> voPlanMap = openingOperationPlanDTOS.stream()
|
||||
.collect(Collectors.toMap(OpeningOperationPlanDTO::getShopId, vo -> vo));
|
||||
log.info("getPlanListPage voPlanMap:{}", voPlanMap);
|
||||
//开店负责人name
|
||||
List<String> shopManagerUserIdList = openPlanShopList.stream()
|
||||
.map(OpenPlanShopInfoDTO::getShopManagerUserId)
|
||||
.collect(Collectors.toList());
|
||||
List<UserInfoDTO> shopManagerList = enterpriseUserDAO.getNameByUserId(shopManagerUserIdList);
|
||||
log.info("getPlanListPage hopManagerList :{}", shopManagerList);
|
||||
Map<Long,UserInfoDTO> voManagerMap = shopManagerList.stream()
|
||||
.collect(Collectors.toMap(UserInfoDTO::getUserId, vo -> vo));
|
||||
log.info("getPlanListPage voManagerMap:{}", voManagerMap);
|
||||
//督导name
|
||||
List<String> supervisorUserIdList = openPlanShopList.stream()
|
||||
.map(OpenPlanShopInfoDTO::getSupervisorUserId)
|
||||
.collect(Collectors.toList());
|
||||
List<UserInfoDTO> supervisorList = enterpriseUserDAO.getNameByUserId(supervisorUserIdList);
|
||||
log.info("getPlanListPage supervisorList :{}", supervisorList);
|
||||
Map<Long, UserInfoDTO> voSupervisorList = supervisorList.stream()
|
||||
.collect(Collectors.toMap(UserInfoDTO::getUserId, vo -> vo));
|
||||
log.info("getPlanListPage openingOperationPlanVOList:{}", openingOperationPlanListVOList);
|
||||
//加盟商姓名,手机号,招商name
|
||||
List<Long> lines = openPlanShopList.stream()
|
||||
.map(OpenPlanShopInfoDTO::getLineId)
|
||||
.collect(Collectors.toList());
|
||||
List<PlanLineDTO> getLines = lineInfoDAO.getLines(lines);
|
||||
log.info("getPlanListPage getLines:{}", getLines);
|
||||
Map<Long,PlanLineDTO> linemap = getLines.stream()
|
||||
.collect(Collectors.toMap(PlanLineDTO::getLineId, vo -> vo));
|
||||
log.info("getPlanListPage linemap:{}", linemap);
|
||||
for (OpeningOperationPlanListVO vo:openingOperationPlanListVOList){
|
||||
vo.setSubmissionTime(voPlanMap.get(vo.getShopId()).getSubmissionTime());
|
||||
vo.setResultType(voPlanMap.get(vo.getShopId()).getResultType());
|
||||
vo.setShopManagerName(voManagerMap.get(vo.getShopId()).getName());
|
||||
vo.setSupervisorName(voSupervisorList.get(vo.getSupervisorUserId()).getName());
|
||||
vo.setPartnerName(linemap.get(vo.getLineId()).getInvestmentManagerName());
|
||||
vo.setMobile(linemap.get(vo.getLineId()).getMobile());
|
||||
vo.setPartnerName(linemap.get(vo.getLineId()).getUsername());
|
||||
}
|
||||
return openingOperationPlanListVOList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -188,9 +188,8 @@ public class Constants
|
||||
|
||||
public static final String TIME_STAMP_FLAG = "yyyy-MM-dd";
|
||||
|
||||
|
||||
|
||||
|
||||
public static final String GET_PROJECT_LIST = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectByCustomLable&remark=%s";
|
||||
public static final String GET_PROJECT_DETAIL= "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.FirstOrderRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.FirstOrderService;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午9:22
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pc/firstOrder")
|
||||
@Api(tags = "PC首批订货金")
|
||||
@Slf4j
|
||||
public class FirstOrderController {
|
||||
|
||||
@Resource
|
||||
private FirstOrderService firstOrderService;
|
||||
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<FirstOrderDTO> get(@RequestParam("shopId") Long shopId) {
|
||||
FirstOrderDTO order = firstOrderService.getOrder(shopId);
|
||||
return ResponseResult.success(order);
|
||||
}
|
||||
@PostMapping("/submit")
|
||||
public ResponseResult getSubmit(@RequestBody FirstOrderRequest request) {
|
||||
FirstOrderDO firstOrderDO = new FirstOrderDO();
|
||||
try {
|
||||
BeanUtils.copyProperties(firstOrderDO,request );
|
||||
firstOrderService.saveOrder(firstOrderDO);
|
||||
return ResponseResult.success();
|
||||
} catch (IllegalAccessException |InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.request.IdRequest;
|
||||
import com.cool.store.request.NewStoreOpeningRequest;
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.NewStoreOpeningService;
|
||||
import com.cool.store.service.OpenAcceptanceInfoService;
|
||||
import com.cool.store.vo.NewStoreOpeningVO;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author byd
|
||||
* @Date 2023/6/15 9:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("pc/newStoreOpening")
|
||||
@Api(tags = "PC新店开业")
|
||||
public class NewStoreOpeningController {
|
||||
|
||||
@Resource
|
||||
OpenAcceptanceInfoService openAcceptanceInfoService;
|
||||
|
||||
@Resource
|
||||
NewStoreOpeningService newStoreOpeningService;
|
||||
|
||||
@GetMapping(path = "/newStoreOpeningList")
|
||||
@ApiOperation("新店开业列表")
|
||||
public ResponseResult<PageInfo<OpenAcceptanceInfoListVO>> newStoreOpeningList(OpenAcceptanceRequest openAcceptanceRequest) {
|
||||
//已验收
|
||||
openAcceptanceRequest.setAcceptanceStatus(1);
|
||||
return ResponseResult.success(openAcceptanceInfoService.openAcceptanceList(openAcceptanceRequest));
|
||||
}
|
||||
|
||||
@GetMapping(path = "/storeTodoList")
|
||||
@ApiOperation("新店开业待办列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
|
||||
})
|
||||
public ResponseResult<List<NewStoreOpeningVO>> storeTodoList(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(newStoreOpeningService.storeTodoList(shopId));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path = "/addStoreTodo")
|
||||
@ApiOperation("新店开业-新建待办")
|
||||
public ResponseResult<Boolean> addStoreTodo(@RequestBody NewStoreOpeningRequest newStoreOpeningRequest) {
|
||||
newStoreOpeningService.addStoreTodo(newStoreOpeningRequest);
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@PostMapping(path = "/removeStoreTodo")
|
||||
@ApiOperation("新店开业-删除待办")
|
||||
public ResponseResult<Boolean> removeStoreTodo(@RequestBody IdRequest idRequest) {
|
||||
newStoreOpeningService.removeStoreTodo(idRequest.getId());
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.request.ShopAcceptanceRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OpenAcceptanceInfoService;
|
||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||
import com.cool.store.vo.ShopAcceptanceVO;
|
||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -41,7 +42,7 @@ public class OpenAcceptanceInfoController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
|
||||
})
|
||||
public ResponseResult<List<ShopStageAcceptanceVO>> acceptanceStageList(@RequestParam("shopId") Long shopId) {
|
||||
public ResponseResult<ShopAcceptanceVO> acceptanceStageList(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(openAcceptanceInfoService.acceptanceStageList(shopId));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.mapper.OpeningOperationPlanMapper;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
import com.cool.store.request.OpeningOperationPlanRequest;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OpeningOperationPlanAuditService;
|
||||
import com.cool.store.service.OpeningOperationPlanService;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午5:28
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("pc/openingOperationPlan")
|
||||
@Api(tags = "开业运营方案")
|
||||
public class OpeningOperationPlanController {
|
||||
|
||||
@Resource
|
||||
private OpeningOperationPlanService openingOperationPlanService;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperation("提交开业运营方案")
|
||||
public ResponseResult submitPlan(@RequestBody OpeningOperationPlanRequest request){
|
||||
Long planId = openingOperationPlanService.savePlan(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
@GetMapping("/getPlan")
|
||||
@ApiOperation("查询开业运营方案")
|
||||
public ResponseResult<OpeningOperationPlanVO> getPlan(@RequestParam Long planId){
|
||||
OpeningOperationPlanVO plan = openingOperationPlanService.getPlanById(planId);
|
||||
return ResponseResult.success(plan);
|
||||
}
|
||||
@PostMapping("/audit")
|
||||
@ApiOperation("审核运营方案")
|
||||
public ResponseResult auditPlan(@RequestBody OpeningOperationPlanAuditRequest request){
|
||||
openingOperationPlanAuditService.auditPlan(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
@GetMapping("/planList")
|
||||
@ApiOperation("查询运营方案列表")
|
||||
public ResponseResult<List<OpeningOperationPlanListVO>> planList(@RequestBody PlanListRequest request){
|
||||
openingOperationPlanService.getPlanListPage(request);
|
||||
return ResponseResult.success(openingOperationPlanService.getPlanListPage(request));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午7:32
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mini/openingOperationPlan")
|
||||
@Api(tags = "开业运营方案操作")
|
||||
@Slf4j
|
||||
public class MiniOpeningOperationPlanController {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user