Merge branch 'cc_sign_20250507' into 'master'
Cc sign 20250507 See merge request hangzhou/java/custom_zxjp!71
This commit is contained in:
@@ -111,6 +111,7 @@ public enum ErrorCodeEnum {
|
||||
POINT_SELECTED(600016, "该铺位已被选择", null),
|
||||
NOT_EXIST_UNSELECT_POINT(600017, "当前没有未选择的铺位", null),
|
||||
SELECT_POINT_ERROR(600018, "铺位选中失败", null),
|
||||
POINT_NOT_SELECT(600019, "该门店未选址", null),
|
||||
|
||||
OPEN_NEW_SHOP_RECORD_NOT_EXIST(700001, "开店申请记录不存在", null),
|
||||
OPEN_NEW_SHOP_RECORD_AUDITED(700002, "开店申请已审核", null),
|
||||
|
||||
@@ -42,6 +42,7 @@ public enum MessageEnum {
|
||||
MESSAGE_17("您收到一份证照信息审核申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_18("您有一个门店已缴纳加盟费/保证金,请审核", " 门店名称:${storeName}\n 加盟商姓名:${partnerUsername}\n 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_19("您有一个门店待提交加盟合同,请查收", "门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_19_1("您有一个门店加盟合同待审核,请查收", "门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_21("您有一个门店待提交培训人员,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}"),
|
||||
MESSAGE_22("您收到一位员工由您带教,请查收", "员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
||||
|
||||
@@ -47,7 +47,7 @@ public enum ShopSubStageStatusEnum {
|
||||
SHOP_SUB_STAGE_STATUS_80(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_83(ShopSubStageEnum.SHOP_STAGE_8, 830, "审核中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_84(ShopSubStageEnum.SHOP_STAGE_8, 840, "已签约", Boolean.TRUE),
|
||||
SHOP_SUB_STAGE_STATUS_85(ShopSubStageEnum.SHOP_STAGE_8, 850, "退回", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_85(ShopSubStageEnum.SHOP_STAGE_8, 850, "审核失败", Boolean.FALSE),
|
||||
|
||||
//发票回传
|
||||
SHOP_SUB_STAGE_STATUS_85_1(ShopSubStageEnum.SHOP_STAGE_8_5, 880, "待提交", Boolean.FALSE),
|
||||
|
||||
@@ -272,4 +272,16 @@ public class ShopInfoDAO {
|
||||
public List<ShopInfoDO> getListByTime(){
|
||||
return shopInfoMapper.getListByTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/5/8
|
||||
* @description: 数据处理专用 处理shop 省市区
|
||||
*/
|
||||
public Integer updateShopCity(List<ShopInfoDO> list){
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return 0;
|
||||
}
|
||||
return shopInfoMapper.updateShopCity(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,4 +139,6 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
List<ShopInfoDO> getListByTime();
|
||||
|
||||
Integer updateShopCity(@Param("list") List<ShopInfoDO> list);
|
||||
|
||||
}
|
||||
|
||||
@@ -43,10 +43,20 @@
|
||||
</sql>
|
||||
<update id="updateAddresseeAddress">
|
||||
update xfsg_order_sys_info
|
||||
<set>
|
||||
<if test="update.addresseeAddress != null and update.addresseeAddress != ''">
|
||||
set addressee_address = #{update.addresseeAddress}
|
||||
addressee_address = #{update.addresseeAddress},
|
||||
</if>
|
||||
|
||||
<if test="update.addresseeProvince !=null and update.addresseeProvince != ''">
|
||||
addressee_province = #{update.addresseeProvince},
|
||||
</if>
|
||||
<if test="update.addresseeCity !=null and update.addresseeCity != ''">
|
||||
addressee_city = #{update.addresseeCity},
|
||||
</if>
|
||||
<if test="update.addresseeDistrict !=null and update.addresseeDistrict != ''">
|
||||
addressee_district = #{update.addresseeDistrict}
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{update.shopId}
|
||||
</update>
|
||||
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.OrderSysInfoDO">
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId"/>
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId"/>
|
||||
<result column="store_type" jdbcType="TINYINT" property="storeType"/>
|
||||
<result column="province" jdbcType="VARCHAR" property="province"/>
|
||||
<result column="province_code" jdbcType="INTEGER" property="provinceCode"/>
|
||||
<result column="city" jdbcType="VARCHAR" property="city"/>
|
||||
<result column="city_code" jdbcType="INTEGER" property="cityCode"/>
|
||||
<result column="district" jdbcType="VARCHAR" property="district"/>
|
||||
<result column="district_code" jdbcType="INTEGER" property="districtCode"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
@@ -37,6 +43,7 @@
|
||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
||||
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
||||
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
|
||||
, province,province_code,city,city_code,district,district_code
|
||||
</sql>
|
||||
|
||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
@@ -491,4 +498,9 @@
|
||||
<update id="updateShopCode">
|
||||
update xfsg_shop_info set shop_code = #{shopCode} where id = #{shopId}
|
||||
</update>
|
||||
<update id="updateShopCity">
|
||||
<foreach collection="list" item="item" index="index" separator=";">
|
||||
update xfsg_shop_info set province =#{item.province}, city = #{item.city}, district=#{item.district} where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -131,4 +131,22 @@ public class ShopInfoDO {
|
||||
|
||||
@Column(name = "store_type")
|
||||
private Integer storeType;
|
||||
//省
|
||||
@Column(name = "province")
|
||||
private String province;
|
||||
//省code
|
||||
@Column(name = "province_code")
|
||||
private Integer provinceCode;
|
||||
//市
|
||||
@Column(name = "city")
|
||||
private String city;
|
||||
//市code
|
||||
@Column(name = "city_code")
|
||||
private Integer cityCode;
|
||||
//区
|
||||
@Column(name = "district")
|
||||
private String district;
|
||||
//区code
|
||||
@Column(name = "district_code")
|
||||
private Integer districtCode;
|
||||
}
|
||||
@@ -62,4 +62,25 @@ public class SignFranchiseDO {
|
||||
private String partnershipSignatorySecond;
|
||||
@Column(name = "business_model")
|
||||
private Integer businessModel;
|
||||
//签约人2身份证号
|
||||
@Column(name = "partnership_signatory_second_id_number")
|
||||
private String partnershipSignatorySecondIdNumber;
|
||||
//签约人2手机号
|
||||
@Column(name = "partnership_signatory_second_mobile")
|
||||
private String partnershipSignatorySecondMobile;
|
||||
//'保护距离 / m'
|
||||
@Column(name = "protective_distance")
|
||||
private Integer protectiveDistance;
|
||||
//介绍人
|
||||
@Column(name = "introducer")
|
||||
private String introducer;
|
||||
//介绍门店
|
||||
@Column(name = "introduce_store")
|
||||
private String introduceStore;
|
||||
//介绍奖
|
||||
@Column(name = "introduction_award")
|
||||
private String introductionAward;
|
||||
//签约人1第几家分店
|
||||
@Column(name = "partnership_signatory_first_which_store")
|
||||
private Integer partnershipSignatoryFirstWhichStore;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -94,6 +95,51 @@ public class AddSignFranchiseRequest {
|
||||
private String partnershipSignatoryFirst;
|
||||
@ApiModelProperty("合伙签约人2")
|
||||
private String partnershipSignatorySecond;
|
||||
//签约人2身份证号
|
||||
@ApiModelProperty("签约人2身份证号")
|
||||
private String partnershipSignatorySecondIdNumber;
|
||||
//签约人2手机号
|
||||
@ApiModelProperty("签约人2手机号")
|
||||
private String partnershipSignatorySecondMobile;
|
||||
//'保护距离 / m'
|
||||
@ApiModelProperty("保护距离 / m")
|
||||
@NotNull(message = "保护距离不能为空")
|
||||
private Integer protectiveDistance;
|
||||
//介绍人
|
||||
@ApiModelProperty("介绍人")
|
||||
private String introducer;
|
||||
//介绍门店
|
||||
@ApiModelProperty("介绍门店")
|
||||
private String introduceStore;
|
||||
//介绍奖
|
||||
@ApiModelProperty("介绍奖")
|
||||
private String introductionAward;
|
||||
//签约人1第几家分店
|
||||
@ApiModelProperty("签约人1第几家分店")
|
||||
@NotNull(message = "签约人1第哪家分店不能为空")
|
||||
private Integer partnershipSignatoryFirstWhichStore;
|
||||
|
||||
//省
|
||||
@ApiModelProperty("省")
|
||||
@NotBlank(message = "省不能为空")
|
||||
private String province;
|
||||
//省code
|
||||
@ApiModelProperty("省code")
|
||||
private Integer provinceCode;
|
||||
//市
|
||||
@ApiModelProperty("市")
|
||||
@NotBlank(message = "市不能为空")
|
||||
private String city;
|
||||
//市code
|
||||
@ApiModelProperty("市code")
|
||||
private Integer cityCode;
|
||||
//区
|
||||
@ApiModelProperty("区")
|
||||
@NotBlank(message = "区不能为空")
|
||||
private String district;
|
||||
//区code
|
||||
@ApiModelProperty("区code")
|
||||
private Integer districtCode;
|
||||
|
||||
|
||||
public SignFranchiseDO toSignFranchiseDO() {
|
||||
@@ -118,6 +164,13 @@ public class AddSignFranchiseRequest {
|
||||
signFranchiseDO.setPartnershipSignatoryFirst(this.partnershipSignatoryFirst);
|
||||
signFranchiseDO.setPartnershipSignatorySecond(this.partnershipSignatorySecond);
|
||||
signFranchiseDO.setBusinessModel(this.businessModel);
|
||||
signFranchiseDO.setPartnershipSignatorySecondIdNumber(this.partnershipSignatorySecondIdNumber);
|
||||
signFranchiseDO.setPartnershipSignatorySecondMobile(this.partnershipSignatorySecondMobile);
|
||||
signFranchiseDO.setProtectiveDistance(this.protectiveDistance);
|
||||
signFranchiseDO.setIntroducer(this.introducer);
|
||||
signFranchiseDO.setIntroduceStore(this.introduceStore);
|
||||
signFranchiseDO.setIntroductionAward(this.introductionAward);
|
||||
signFranchiseDO.setPartnershipSignatoryFirstWhichStore(this.partnershipSignatoryFirstWhichStore);
|
||||
return signFranchiseDO;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/7 15:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AuditApproveRequest {
|
||||
|
||||
@ApiModelProperty("审核结果 1:成功 0:失败")
|
||||
private Integer auditResult;
|
||||
|
||||
@ApiModelProperty("通过/失败原因")
|
||||
private String cause = "";
|
||||
|
||||
private Long shopId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/7 17:25
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class OperationLogRequest {
|
||||
|
||||
@ApiModelProperty("门店ID")
|
||||
@NotNull(message = "门店ID不能为空")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("子阶段状态")
|
||||
@NotNull(message = "子阶段状态不能为空")
|
||||
private List<Integer> subStageStatusList;
|
||||
}
|
||||
@@ -190,4 +190,46 @@ public class AddSignFranchiseResponse {
|
||||
private Integer joinMode;
|
||||
|
||||
|
||||
//签约人2身份证号
|
||||
@ApiModelProperty("签约人2身份证号")
|
||||
private String partnershipSignatorySecondIdNumber;
|
||||
//签约人2手机号
|
||||
@ApiModelProperty("签约人2手机号")
|
||||
private String partnershipSignatorySecondMobile;
|
||||
//'保护距离 / m'
|
||||
@ApiModelProperty("保护距离 / m")
|
||||
private Integer protectiveDistance;
|
||||
//介绍人
|
||||
@ApiModelProperty("介绍人")
|
||||
private String introducer;
|
||||
//介绍门店
|
||||
@ApiModelProperty("介绍门店")
|
||||
private String introduceStore;
|
||||
//介绍奖
|
||||
@ApiModelProperty("介绍奖")
|
||||
private String introductionAward;
|
||||
//签约人1第几家分店
|
||||
@ApiModelProperty("签约人1第几家分店")
|
||||
private Integer partnershipSignatoryFirstWhichStore;
|
||||
|
||||
//省
|
||||
@ApiModelProperty("省")
|
||||
private String province;
|
||||
//省code
|
||||
@ApiModelProperty("省code")
|
||||
private Integer provinceCode;
|
||||
//市
|
||||
@ApiModelProperty("市")
|
||||
private String city;
|
||||
//市code
|
||||
@ApiModelProperty("市code")
|
||||
private Integer cityCode;
|
||||
//区
|
||||
@ApiModelProperty("区")
|
||||
private String district;
|
||||
//区code
|
||||
@ApiModelProperty("区code")
|
||||
private Integer districtCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -111,4 +111,6 @@ public interface ShopService {
|
||||
ShopResponse getShopNameAndCode(Long shopId,Long lineId);
|
||||
|
||||
String getFranchiseBrandName(Long shopId);
|
||||
//处理shop表省市区
|
||||
Integer dateHandler(Integer pageNum, Integer pageSize);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.AddSignFranchiseRequest;
|
||||
import com.cool.store.request.AuditApproveRequest;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
|
||||
@@ -14,9 +16,24 @@ public interface SignFranchiseService {
|
||||
*/
|
||||
ResponseResult submitSignFranchise(AddSignFranchiseRequest request, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* 驳回之后从新提交数据
|
||||
* @param request
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
Boolean reSubmitSignFranchise(AddSignFranchiseRequest request, LoginUserInfo user);
|
||||
|
||||
|
||||
AddSignFranchiseResponse getSignFranchise(Long shopId);
|
||||
|
||||
/**
|
||||
* 分部内勤审核
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean auditApprove(AuditApproveRequest request, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* 加盟合同退回后重新缴费
|
||||
* @param shopId
|
||||
|
||||
@@ -62,6 +62,14 @@ public interface UserAuthMappingService {
|
||||
|
||||
List<EnterpriseUserDO> getAllUserByRoleEnumAndRegionId(UserRoleEnum userRoleEnum, Long regionId);
|
||||
|
||||
/**
|
||||
* 获取有区域权限和职位的人
|
||||
* @param userRoleEnumList
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserDO> getUserIdByRoleEnumAndRegionId(List<UserRoleEnum> userRoleEnumList, Long regionId);
|
||||
|
||||
/**
|
||||
* 获取有区域权限和职位 所有人
|
||||
*
|
||||
|
||||
@@ -114,14 +114,14 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
||||
response.setXgjVicePresident(user.getName());
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(pointInfo)) {
|
||||
if (StringUtils.isBlank(response.getAddresseeProvince())){
|
||||
response.setAddresseeProvince(pointInfo.getProvince());}
|
||||
if (StringUtils.isBlank(response.getAddresseeCity())){
|
||||
response.setAddresseeCity(pointInfo.getCity());}
|
||||
if (StringUtils.isBlank(response.getAddresseeDistrict())){
|
||||
response.setAddresseeDistrict(pointInfo.getDistrict());}
|
||||
}
|
||||
if (Objects.nonNull(pointInfo)) {
|
||||
if (StringUtils.isBlank(response.getAddresseeProvince())){
|
||||
response.setAddresseeProvince(pointInfo.getProvince());}
|
||||
if (StringUtils.isBlank(response.getAddresseeCity())){
|
||||
response.setAddresseeCity(pointInfo.getCity());}
|
||||
if (StringUtils.isBlank(response.getAddresseeDistrict())){
|
||||
response.setAddresseeDistrict(pointInfo.getDistrict());}
|
||||
}
|
||||
if (StringUtils.isBlank(response.getAddresseeAddress())){
|
||||
response.setAddresseeAddress(shopInfo.getDetailAddress());}
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
@Override
|
||||
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_8,
|
||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus()), Boolean.TRUE);
|
||||
Arrays.asList(SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_83.getShopSubStageStatus()), Boolean.TRUE);
|
||||
|
||||
List<PreparationCommonPendingVO> list = pageInfo.getList();
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
|
||||
@@ -841,6 +841,18 @@ public class PointServiceImpl implements PointService {
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_IS_SELECTED);
|
||||
}
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())){
|
||||
updatePoint.setProvince(shopInfo.getProvince());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())){
|
||||
updatePoint.setCity(shopInfo.getCity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())){
|
||||
updatePoint.setDistrict(shopInfo.getDistrict());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())){
|
||||
updatePoint.setAddress(shopInfo.getDetailAddress());
|
||||
}
|
||||
updatePoint.setId(pointId);
|
||||
updatePoint.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
||||
updatePoint.setLineId(lineId);
|
||||
@@ -950,6 +962,18 @@ public class PointServiceImpl implements PointService {
|
||||
//更新店铺所处阶段
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfo.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11);
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())){
|
||||
updatePoint.setProvince(shopInfo.getProvince());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())){
|
||||
updatePoint.setCity(shopInfo.getCity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())){
|
||||
updatePoint.setDistrict(shopInfo.getDistrict());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())){
|
||||
updatePoint.setAddress(shopInfo.getDetailAddress());
|
||||
}
|
||||
updatePoint.setId(pointId);
|
||||
updatePoint.setShopId(shopInfo.getId());
|
||||
pointInfoDAO.updatePointInfo(updatePoint);
|
||||
|
||||
@@ -644,5 +644,29 @@ public class ShopServiceImpl implements ShopService {
|
||||
return FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer dateHandler(Integer pageNum, Integer pageSize) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<ShopStageInfoDO> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus());
|
||||
List<Long> shopIds = shopIdListByStageStatus.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||
List<ShopInfoDO> shopList = shopInfoDAO.getShopListByIds(shopIds);
|
||||
List<Long> pointIdList = shopList.stream().filter(o -> o.getPointId() != null).map(ShopInfoDO::getPointId).collect(Collectors.toList());
|
||||
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointIdList);
|
||||
Map<Long, PointInfoDO> pointInfoDOMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||
for (ShopInfoDO shopInfoDO : shopList) {
|
||||
if (shopInfoDO.getPointId() == null ){
|
||||
continue;
|
||||
}
|
||||
PointInfoDO pointInfoDO = pointInfoDOMap.get(shopInfoDO.getPointId());
|
||||
if (pointInfoDO == null ){
|
||||
continue;
|
||||
}
|
||||
shopInfoDO.setProvince(pointInfoDO.getProvince());
|
||||
shopInfoDO.setCity(pointInfoDO.getCity());
|
||||
shopInfoDO.setDistrict(pointInfoDO.getDistrict());
|
||||
}
|
||||
return shopInfoDAO.updateShopCity(shopList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ import cn.hutool.core.convert.Convert;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserRoleDao;
|
||||
import com.cool.store.dao.OrderSysInfoDAO;
|
||||
import com.cool.store.dao.QualificationsInfoDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
@@ -15,14 +12,12 @@ import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.AddSignFranchiseRequest;
|
||||
import com.cool.store.request.AuditApproveRequest;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.FranchiseAgreementRequest;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.SignFranchiseService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.GeoMapUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
@@ -31,6 +26,7 @@ import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -40,9 +36,14 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.UserRoleEnum.*;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResultService {
|
||||
|
||||
@Resource
|
||||
private PointInfoDAO pointInfoDAO;
|
||||
@Resource
|
||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||
@Resource
|
||||
@@ -103,6 +104,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
|
||||
@Resource
|
||||
private OrderSysInfoDAO orderSysInfoDAO;
|
||||
@Resource
|
||||
OperationLogService operationLogService;
|
||||
@Resource
|
||||
OperationLogDAO operationLogDAO;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -164,6 +169,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
||||
String lockKey = "submitSignFranchise:" + request.getShopId();
|
||||
//流水
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
@@ -173,61 +180,32 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
if (Objects.isNull(request.getId())) {
|
||||
signFranchiseMapper.insertSelective(signFranchiseDO);
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
//暂时去掉
|
||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
//todo 提交之后先直接到已签约 正常是待审核
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||
//发送通知
|
||||
List<EnterpriseUserDO> auditFranchiseFeeUsers = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(BRANCH_OFFICE, REGION_OFFICE), shopInfoDO.getRegionId());
|
||||
List<String> auditFranchiseFeeUserList = auditFranchiseFeeUsers.stream().distinct().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = new ArrayList<>();
|
||||
if (Objects.nonNull(userDOList)) {
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
List<String> liGuiNeiQinList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Arrays.asList(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode()));
|
||||
commonService.sendQWMessage(liGuiNeiQinList,
|
||||
MessageEnum.MESSAGE_57,
|
||||
map);
|
||||
// commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
// MessageEnum.MESSAGE_35,
|
||||
// map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_26,
|
||||
commonService.sendQWMessage(auditFranchiseFeeUserList,
|
||||
MessageEnum.MESSAGE_19_1,
|
||||
map);
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80, user.getUserId(), user.getName(),
|
||||
OperationTypeEnum.OPERATION_TYPE_0, "加盟签约合同提交", OperationStatusEnum.PROCESSED);
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83,
|
||||
user.getUserId(), auditFranchiseFeeUsers,
|
||||
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED);
|
||||
|
||||
} else {
|
||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||
}
|
||||
//店铺信息
|
||||
shopInfoDO.setRegionId(request.getRegionId());
|
||||
shopInfoDO.setShopName(request.getShopName());
|
||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||
shopInfoDO.setJoinMode(request.getJoinMode());
|
||||
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
||||
shopInfoDO.setUpdateTime(new Date());
|
||||
shopInfoDO.setStoreType(request.getStoreType());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(request.getShopId());
|
||||
if (Objects.isNull(orderSysInfoDO)){
|
||||
orderSysInfoDO = new OrderSysInfoDO();
|
||||
orderSysInfoDO.setShopId(request.getShopId());
|
||||
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
||||
}else{
|
||||
//同步建店资料地址
|
||||
orderSysInfoDO.setAddresseeAddress(request.getDetailAddress());
|
||||
orderSysInfoDAO.updateAddresseeAddress(orderSysInfoDO);
|
||||
}
|
||||
//修改shop & point
|
||||
updateShopAndPoint(request, shopInfoDO, pointInfoById);
|
||||
|
||||
return new ResponseResult(200000, "提交成功");
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
@@ -245,6 +223,85 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean reSubmitSignFranchise(AddSignFranchiseRequest request, LoginUserInfo user) {
|
||||
log.info("reSubmitSignFranchise request:{}", JSONObject.toJSONString(request));
|
||||
if (Objects.isNull(request)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
if (Objects.isNull(request.getShopId())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||
//修改信息
|
||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||
// //修改shop & point & 同步建店资料地址
|
||||
updateShopAndPoint(request, shopInfoDO, pointInfoById);
|
||||
//修改阶段状态
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||
//发送通知
|
||||
List<EnterpriseUserDO> userIds = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(BRANCH_OFFICE, REGION_OFFICE), shopInfoDO.getRegionId());
|
||||
List<String> auditFranchiseFeeUserList = userIds.stream().distinct().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
commonService.sendQWMessage(auditFranchiseFeeUserList,
|
||||
MessageEnum.MESSAGE_19_1,
|
||||
map);
|
||||
//新增审批记录
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80, user.getUserId(), user.getName(),
|
||||
OperationTypeEnum.OPERATION_TYPE_0, "加盟签约合同重新提交提交", OperationStatusEnum.PROCESSED);
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83,
|
||||
user.getUserId(), userIds,
|
||||
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED);
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
private void updateShopAndPoint(AddSignFranchiseRequest request, ShopInfoDO shopInfoDO, PointInfoDO pointInfoById) {
|
||||
//店铺信息
|
||||
shopInfoDO.setRegionId(request.getRegionId());
|
||||
shopInfoDO.setShopName(request.getShopName());
|
||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||
shopInfoDO.setJoinMode(request.getJoinMode());
|
||||
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
||||
shopInfoDO.setProvince(request.getProvince());
|
||||
shopInfoDO.setCity(request.getCity());
|
||||
shopInfoDO.setDistrict(request.getDistrict());
|
||||
shopInfoDO.setProvinceCode(request.getProvinceCode());
|
||||
shopInfoDO.setCityCode(request.getCityCode());
|
||||
shopInfoDO.setDistrictCode(request.getDistrictCode());
|
||||
shopInfoDO.setUpdateTime(new Date());
|
||||
shopInfoDO.setStoreType(request.getStoreType());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
if (Objects.nonNull(pointInfoById)) {
|
||||
pointInfoById.setProvince(request.getProvince());
|
||||
pointInfoById.setCity(request.getCity());
|
||||
pointInfoById.setDistrict(request.getDistrict());
|
||||
pointInfoById.setAddress(request.getDetailAddress());
|
||||
pointInfoById.setUpdateTime(new Date());
|
||||
pointInfoDAO.updatePointInfo(pointInfoById);
|
||||
}
|
||||
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(request.getShopId());
|
||||
if (Objects.isNull(orderSysInfoDO)) {
|
||||
orderSysInfoDO = new OrderSysInfoDO();
|
||||
orderSysInfoDO.setShopId(request.getShopId());
|
||||
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
||||
} else {
|
||||
//同步建店资料地址
|
||||
orderSysInfoDO.setAddresseeAddress(request.getDetailAddress());
|
||||
orderSysInfoDO.setAddresseeCity(request.getCity());
|
||||
orderSysInfoDO.setAddresseeDistrict(request.getDistrict());
|
||||
orderSysInfoDO.setAddresseeProvince(request.getProvince());
|
||||
orderSysInfoDAO.updateAddresseeAddress(orderSysInfoDO);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddSignFranchiseResponse getSignFranchise(Long shopId) {
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||
@@ -267,6 +324,86 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean auditApprove(AuditApproveRequest request, LoginUserInfo user) {
|
||||
log.info("SignFranchiseServiceImpl auditApprove request:{}", JSONObject.toJSONString(request));
|
||||
Long shopId = request.getShopId();
|
||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||
if (request.getAuditResult() == 1) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84;
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setShopId(shopId);
|
||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.SIGN_FRANCHISE.getCode());
|
||||
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
||||
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||
//驳回
|
||||
if (Constants.ZERO_INTEGER.equals(request.getAuditResult())) {
|
||||
shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
|
||||
shopAuditInfoDO.setRejectReason(request.getCause());
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||
if (Objects.nonNull(branchUser)) {
|
||||
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
auditFranchiseFeeUsers.addAll(branchUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(REGION_OFFICE, shopInfoDO.getRegionId());
|
||||
if (Objects.nonNull(regionUser)) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
auditFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
||||
requestMap.put("partnerName", lineInfo.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
||||
commonService.sendMessage(new ArrayList<>(auditFranchiseFeeUsers), MessageEnum.MESSAGE_20, requestMap);
|
||||
} else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
|
||||
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
|
||||
shopAuditInfoDO.setPassReason(request.getCause());
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
//暂时去掉
|
||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = new ArrayList<>();
|
||||
if (Objects.nonNull(userDOList)) {
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
List<String> liGuiNeiQinList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Arrays.asList(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode()));
|
||||
commonService.sendQWMessage(liGuiNeiQinList,
|
||||
MessageEnum.MESSAGE_57,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_26,
|
||||
map);
|
||||
}
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
Long auditId = shopAuditInfoDO.getId();
|
||||
signFranchiseMapper.updateAuditByShopId(auditId, shopId);
|
||||
//审批记录表记录
|
||||
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||
operationLogService.batchUpdateProcessed(operationLogs, auditId, user.getUserId(), request.getCause());
|
||||
return true;
|
||||
}
|
||||
|
||||
public AddSignFranchiseResponse from(SignFranchiseDO signFranchiseDO,
|
||||
Long shopId) {
|
||||
AddSignFranchiseResponse addSignFranchiseResponse = new AddSignFranchiseResponse();
|
||||
@@ -282,16 +419,29 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
Long lineId = shopInfoDO.getLineId();
|
||||
//缴款信息
|
||||
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId);
|
||||
//铺位信息
|
||||
PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
||||
// //铺位信息
|
||||
// PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
||||
//证照办理
|
||||
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
|
||||
|
||||
RegionDO regionInfo = regionMapper.getByRegionId(shopInfoDO.getRegionId());
|
||||
|
||||
|
||||
// if (Objects.nonNull(pointInfoDO)) {
|
||||
// // addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
||||
// if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())) {
|
||||
// //GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(pointInfoDO.getLatitude(), pointInfoDO.getLongitude());
|
||||
// //addSignFranchiseResponse.setStoreProvinceCity(String.format("%s%s%s", addressInfo.getProvince(), addressInfo.getCity(), addressInfo.getDistrict()));
|
||||
// }
|
||||
// }
|
||||
addSignFranchiseResponse.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
addSignFranchiseResponse.setDetailAddress(shopInfoDO.getDetailAddress());
|
||||
addSignFranchiseResponse.setStoreType(shopInfoDO.getStoreType());
|
||||
addSignFranchiseResponse.setProvince(shopInfoDO.getProvince());
|
||||
addSignFranchiseResponse.setCity(shopInfoDO.getCity());
|
||||
addSignFranchiseResponse.setDistrict(shopInfoDO.getDistrict());
|
||||
addSignFranchiseResponse.setProvinceCode(shopInfoDO.getProvinceCode());
|
||||
addSignFranchiseResponse.setCityCode(shopInfoDO.getCityCode());
|
||||
addSignFranchiseResponse.setDistrictCode(shopInfoDO.getDistrictCode());
|
||||
if (Objects.nonNull(signFranchiseDO)) {
|
||||
addSignFranchiseResponse.setId(signFranchiseDO.getId());
|
||||
addSignFranchiseResponse.setShopId(signFranchiseDO.getShopId());
|
||||
@@ -313,6 +463,13 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
addSignFranchiseResponse.setPartnershipSignatoryFirst(signFranchiseDO.getPartnershipSignatoryFirst());
|
||||
addSignFranchiseResponse.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
|
||||
addSignFranchiseResponse.setBusinessModel(signFranchiseDO.getBusinessModel());
|
||||
addSignFranchiseResponse.setPartnershipSignatorySecondIdNumber(signFranchiseDO.getPartnershipSignatorySecondIdNumber());
|
||||
addSignFranchiseResponse.setPartnershipSignatorySecondMobile(signFranchiseDO.getPartnershipSignatorySecondMobile());
|
||||
addSignFranchiseResponse.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
|
||||
addSignFranchiseResponse.setIntroducer(signFranchiseDO.getIntroducer());
|
||||
addSignFranchiseResponse.setIntroduceStore(signFranchiseDO.getIntroduceStore());
|
||||
addSignFranchiseResponse.setIntroductionAward(signFranchiseDO.getIntroductionAward());
|
||||
addSignFranchiseResponse.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
|
||||
|
||||
} else {
|
||||
BigDecimal total = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
|
||||
@@ -333,13 +490,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
addSignFranchiseResponse.setRegionName(regionInfo.getName());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(pointInfoDO)) {
|
||||
addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
||||
if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())) {
|
||||
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(pointInfoDO.getLatitude(), pointInfoDO.getLongitude());
|
||||
addSignFranchiseResponse.setStoreProvinceCity(String.format("%s%s%s", addressInfo.getProvince(), addressInfo.getCity(), addressInfo.getDistrict()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(linePayDO)) {
|
||||
addSignFranchiseResponse.setPayName(linePayDO.getPayUserName());
|
||||
addSignFranchiseResponse.setBankCardNo(linePayDO.getPayAccount());
|
||||
@@ -406,7 +556,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
|
||||
@Override
|
||||
public Integer dateHandle() {
|
||||
return signFranchiseMapper.dateHandle();
|
||||
return signFranchiseMapper.dateHandle();
|
||||
}
|
||||
|
||||
private int timeUtils(Date time, String type) {
|
||||
|
||||
@@ -215,6 +215,21 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EnterpriseUserDO> getUserIdByRoleEnumAndRegionId(List<UserRoleEnum> userRoleEnumList, Long regionId) {
|
||||
Set<EnterpriseUserDO> userIds = new HashSet<>();
|
||||
if (CollectionUtils.isEmpty(userRoleEnumList)||regionId==null){
|
||||
return new ArrayList<>(userIds);
|
||||
}
|
||||
userRoleEnumList.stream().forEach(x->{
|
||||
List<EnterpriseUserDO> allUserByRoleEnumAndRegionId = getAllUserByRoleEnumAndRegionId(x, regionId);
|
||||
if (Objects.nonNull(allUserByRoleEnumAndRegionId)) {
|
||||
userIds.addAll(allUserByRoleEnumAndRegionId);
|
||||
}
|
||||
});
|
||||
return new ArrayList<>(userIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EnterpriseUserDO> getUserByRoleEnumAndRegionIdList(UserRoleEnum userRoleEnum, Long regionId) {
|
||||
// 查找有区域权限的人
|
||||
|
||||
@@ -46,13 +46,13 @@ public class OpenApiValidateFilter implements Filter {
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
|
||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
String uri = request.getRequestURI();
|
||||
if(!uri.startsWith("/zxjp/open/v1/getYlsToken")){
|
||||
filterChain.doFilter(servletRequest, response);
|
||||
return;
|
||||
}
|
||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||
|
||||
// 1. 验证时间戳
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.request.OperationLogRequest;
|
||||
import com.cool.store.response.AuditInfoResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OperationLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/5/7 17:23
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("pc/operation")
|
||||
@Api(tags = "审批记录")
|
||||
public class OperationLogController {
|
||||
|
||||
@Resource
|
||||
OperationLogService operationLogService;
|
||||
@PostMapping("/commonAuditInfo")
|
||||
@ApiOperation("获取审批流")
|
||||
public ResponseResult<List<AuditInfoResponse>> auditInfo(@RequestBody @Validated OperationLogRequest request){
|
||||
return ResponseResult.success(operationLogService.getAuditInfo(request.getShopId(), request.getSubStageStatusList()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -129,4 +129,10 @@ public class PCShopController {
|
||||
public ResponseResult<Boolean> updateShopStatue(@RequestParam("shopId")Long shopId) {
|
||||
return ResponseResult.success(shopService.updateShopStatue(shopId));
|
||||
}
|
||||
|
||||
@ApiOperation("数据处理专用 处理shop 省市区")
|
||||
@GetMapping("/dateHandler")
|
||||
public ResponseResult<Integer> dateHandler(@RequestParam("pageSize")Integer pageSize,@RequestParam("pageNum")Integer pageNum) {
|
||||
return ResponseResult.success(shopService.dateHandler(pageNum,pageSize));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.cool.store.controller.webb;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.AddSignFranchiseRequest;
|
||||
import com.cool.store.request.AuditApproveRequest;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.SignFranchiseService;
|
||||
@@ -28,6 +29,20 @@ public class PCSignFranchiseController {
|
||||
return signFranchiseService.submitSignFranchise(request,user);
|
||||
}
|
||||
|
||||
@ApiOperation("重新提交加盟合同签约")
|
||||
@PostMapping("/reSubmitSignFranchise")
|
||||
public ResponseResult<Boolean> reSubmitSignFranchise(@RequestBody @Validated AddSignFranchiseRequest request) {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(signFranchiseService.reSubmitSignFranchise(request,user));
|
||||
}
|
||||
|
||||
@ApiOperation("加盟合同签约审核")
|
||||
@PostMapping("/audit/result")
|
||||
public ResponseResult<Boolean> auditSignFranchise(@RequestBody @Validated AuditApproveRequest request) {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(signFranchiseService.auditApprove(request,user));
|
||||
}
|
||||
|
||||
@ApiOperation("获取默认值")
|
||||
@GetMapping("/default/get")
|
||||
public ResponseResult<AddSignFranchiseResponse> getSignFranchise(@RequestParam("shopId") Long shopId) {
|
||||
|
||||
@@ -63,7 +63,7 @@ signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses = http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.admin.addresses = http://10.6.48.226:10001/xxl-job-admin
|
||||
xxl.job.executor.appname = ${spring.application.name}
|
||||
xxl.job.executor.ip =
|
||||
xxl.job.executor.port = 40301
|
||||
|
||||
Reference in New Issue
Block a user