feat:密码数据处理,验签排除空字符串,导出接口
This commit is contained in:
@@ -31,6 +31,7 @@ public class CommonConstants {
|
|||||||
public static final int TEN_SECONDS = 10000;
|
public static final int TEN_SECONDS = 10000;
|
||||||
|
|
||||||
public static final int ONE_SECONDS = 1000;
|
public static final int ONE_SECONDS = 1000;
|
||||||
|
public static final int TOW_SECONDS = 2000;
|
||||||
|
|
||||||
public static final int MAX_EXPORT_SIZE = 10000;
|
public static final int MAX_EXPORT_SIZE = 10000;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/28/19:52
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
public enum DeclareGoodsTypeEnum {
|
||||||
|
// 0-按1周/次报货 1-按月报货 2-自提 3-按2周/次投货 4-按3周/次投货”
|
||||||
|
WEEK_ONCE("0", "按1周/次报货"),
|
||||||
|
MONTH("1", "按月报货"),
|
||||||
|
SELF_PICKUP("2", "自提"),
|
||||||
|
TWO_WEEK_ONCE("3", "按2周/次投货"),
|
||||||
|
THREE_WEEK_ONCE("4", "按3周/次投货");
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
DeclareGoodsTypeEnum(String code, String name) {
|
||||||
|
this.code = code;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getNameByCode(String code) {
|
||||||
|
if (StringUtils.isBlank(code)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (DeclareGoodsTypeEnum declareGoodsTypeEnum : DeclareGoodsTypeEnum.values()) {
|
||||||
|
if (declareGoodsTypeEnum.getCode().equals(code)) {
|
||||||
|
return declareGoodsTypeEnum.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -255,6 +255,7 @@ public enum ErrorCodeEnum {
|
|||||||
GET_YLS_CODE_FAIL(151006,"系统无云流水编码!无法获取TOKEN!请先维护该编码",null),
|
GET_YLS_CODE_FAIL(151006,"系统无云流水编码!无法获取TOKEN!请先维护该编码",null),
|
||||||
|
|
||||||
BANK_EXIST(151007,"当前银行已存在,请直接选择!",null),
|
BANK_EXIST(151007,"当前银行已存在,请直接选择!",null),
|
||||||
|
EXPORT_LIMIT_1000(151008,"导出数据不能超过1000条,请增加筛选条件,减少导出数量",null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ public enum FileTypeEnum {
|
|||||||
MY_FRANCHISEES("my_franchisees","我的加盟商"),
|
MY_FRANCHISEES("my_franchisees","我的加盟商"),
|
||||||
TEAM_FRANCHISEES("team_franchisees","团队加盟商"),
|
TEAM_FRANCHISEES("team_franchisees","团队加盟商"),
|
||||||
PREPARATION("preparation","进度管理"),
|
PREPARATION("preparation","进度管理"),
|
||||||
BRANCH_SHOP_LIST("branchShopList","开店管理")
|
BRANCH_SHOP_LIST("branchShopList","开店管理"),
|
||||||
|
EXPORT_FINANCE("exportFinance","财务导出"),
|
||||||
|
EXPORT_JOIN_SHOP("exportJoinShop","开店导出"),
|
||||||
|
EXPORT_PROGRESS("exportProgress","进度导出"),
|
||||||
;
|
;
|
||||||
private String fileType;
|
private String fileType;
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|||||||
@@ -51,4 +51,16 @@ public enum OpenStatusEnum {
|
|||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
public static String getByCode(Integer code){
|
||||||
|
if (code == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (OpenStatusEnum openStatusEnum : OpenStatusEnum.values()) {
|
||||||
|
if(openStatusEnum.getCode().equals(code)){
|
||||||
|
return openStatusEnum.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/28/19:27
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
public enum StoreTypeEnum {
|
||||||
|
//:0-无展示门店、1-餐厅店、2-普通门店
|
||||||
|
NO_SHOW_STORE(0, "无展示门店"),
|
||||||
|
RESTAURANT_STORE(1, "餐厅店"),
|
||||||
|
ORDINARY_STORE(2, "普通门店");
|
||||||
|
private Integer code;
|
||||||
|
private String message;
|
||||||
|
StoreTypeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
public static String getMessage(Integer code) {
|
||||||
|
if (code == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (StoreTypeEnum c : StoreTypeEnum.values()) {
|
||||||
|
if (c.getCode().equals(code)) {
|
||||||
|
return c.message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -194,6 +194,6 @@ public enum ShopSubStageStatusEnum {
|
|||||||
return stageStatusEnum;
|
return stageStatusEnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return SHOP_SUB_STAGE_STATUS_00;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.cool.store.utils;
|
package com.cool.store.utils;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import javax.crypto.Mac;
|
import javax.crypto.Mac;
|
||||||
@@ -47,7 +49,7 @@ public class SignatureUtils {
|
|||||||
|
|
||||||
// 拼接排序后的参数
|
// 拼接排序后的参数
|
||||||
sortedParams.forEach((key, value) ->{
|
sortedParams.forEach((key, value) ->{
|
||||||
if (Objects.isNull(value)||(value instanceof Double &&((Double) value).intValue()==0)){
|
if (Objects.isNull(value)|| (value instanceof String && StringUtil.isBlank(value.toString())) || (value instanceof Double &&((Double) value).intValue()==0)){
|
||||||
log.info("0或者空值不参与签名");
|
log.info("0或者空值不参与签名");
|
||||||
}else {
|
}else {
|
||||||
if (value instanceof Double){
|
if (value instanceof Double){
|
||||||
|
|||||||
@@ -2,10 +2,14 @@ package com.cool.store.dao;
|
|||||||
|
|
||||||
import com.cool.store.entity.BuildInformationDO;
|
import com.cool.store.entity.BuildInformationDO;
|
||||||
import com.cool.store.mapper.BuildInformationMapper;
|
import com.cool.store.mapper.BuildInformationMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import tk.mybatis.mapper.entity.Example;
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: WangShuo
|
* @Author: WangShuo
|
||||||
@@ -39,5 +43,17 @@ public class BuildInformationDAO {
|
|||||||
return buildInformationMapper.selectOneByExample(example);
|
return buildInformationMapper.selectOneByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 获取小程序店铺名称 导出用
|
||||||
|
*/
|
||||||
|
public List<BuildInformationDO> getSpecificByShopIdList(List<Long> shopIdList) {
|
||||||
|
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
return buildInformationMapper.getSpecificByShopIdList(shopIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,4 +95,12 @@ public class HyPartnerUserInfoDAO {
|
|||||||
return hyPartnerUserInfoMapper.selectLastCrmCreateTime();
|
return hyPartnerUserInfoMapper.selectLastCrmCreateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 数据处理专用只处理,盐值 密码 第二密码
|
||||||
|
*/
|
||||||
|
public Integer dataHandle(List<HyPartnerUserInfoDO> hyPartnerUserInfoDOList){
|
||||||
|
return hyPartnerUserInfoMapper.dataHandle(hyPartnerUserInfoDOList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.BuildInformationDO;
|
||||||
import com.cool.store.entity.OrderSysInfoDO;
|
import com.cool.store.entity.OrderSysInfoDO;
|
||||||
import com.cool.store.mapper.OrderSysInfoMapper;
|
import com.cool.store.mapper.OrderSysInfoMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import tk.mybatis.mapper.entity.Example;
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: WangShuo
|
* @Author: WangShuo
|
||||||
@@ -34,4 +38,12 @@ public class OrderSysInfoDAO {
|
|||||||
example.createCriteria().andEqualTo("shopId",orderSysInfoDO.getShopId());
|
example.createCriteria().andEqualTo("shopId",orderSysInfoDO.getShopId());
|
||||||
return orderSysInfoMapper.updateByExampleSelective(orderSysInfoDO,example);
|
return orderSysInfoMapper.updateByExampleSelective(orderSysInfoDO,example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//只获取特定几个字段值
|
||||||
|
public List<OrderSysInfoDO> getSpecificByShopIdList(List<Long> shopIdList){
|
||||||
|
if (CollectionUtils.isEmpty(shopIdList)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return orderSysInfoMapper.getSpecificByShopIdList(shopIdList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dto.MiniShopDTO;
|
import com.cool.store.dto.MiniShopDTO;
|
||||||
import com.cool.store.dto.PCPointListDTO;
|
import com.cool.store.dto.PCPointListDTO;
|
||||||
|
import com.cool.store.dto.PointInfoDTO;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
import com.cool.store.mapper.PointInfoMapper;
|
import com.cool.store.mapper.PointInfoMapper;
|
||||||
@@ -97,6 +98,13 @@ public class PointInfoDAO {
|
|||||||
return pointInfoMapper.getPointListByIds(pointIds);
|
return pointInfoMapper.getPointListByIds(pointIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PointInfoDTO> getPointAndDetailByIds(List<Long> pointIds){
|
||||||
|
if(CollectionUtils.isEmpty(pointIds)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return pointInfoMapper.getPointAndDetailByIds(pointIds);
|
||||||
|
}
|
||||||
|
|
||||||
public Page<PCPointListDTO> getRecommendPointList(RecommendPointPageRequest request) {
|
public Page<PCPointListDTO> getRecommendPointList(RecommendPointPageRequest request) {
|
||||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
return pointInfoMapper.getRecommendPointList(request);
|
return pointInfoMapper.getRecommendPointList(request);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class QualificationsInfoDAO {
|
|||||||
return qualificationsInfoMapper.getByLineId(lineId);
|
return qualificationsInfoMapper.getByLineId(lineId);
|
||||||
}
|
}
|
||||||
public List<QualificationsInfoDO> getByLineIds(@Param("lineIds") List<Long> lineIds){
|
public List<QualificationsInfoDO> getByLineIds(@Param("lineIds") List<Long> lineIds){
|
||||||
if (lineIds==null||lineIds.size()==0){
|
if (lineIds==null|| lineIds.isEmpty()){
|
||||||
return new java.util.ArrayList<>();
|
return new java.util.ArrayList<>();
|
||||||
}
|
}
|
||||||
Example example = new Example(QualificationsInfoDO.class);
|
Example example = new Example(QualificationsInfoDO.class);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.cool.store.utils.StringUtil;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -133,6 +134,28 @@ public class ShopAccountDAO {
|
|||||||
return shopAccountMapper.getALlFail();
|
return shopAccountMapper.getALlFail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ShopAccountDO> getByShopIds(List<Long> shopIds){
|
||||||
|
Example example = new Example(ShopAccountDO.class);
|
||||||
|
example.createCriteria().andIn("shopId", shopIds);
|
||||||
|
return shopAccountMapper.selectByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 数据处理专用只处理,盐值 密码 第二密码
|
||||||
|
*/
|
||||||
|
public Integer dateHandle(List<ShopAccountDO> list){
|
||||||
|
return shopAccountMapper.dateHandle(list);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 获取特定字段 导出用
|
||||||
|
*/
|
||||||
|
public List<ShopAccountDO> getSpecificByShopIds(List<Long> shopIds){
|
||||||
|
return shopAccountMapper.getSpecificByShopIds(shopIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,4 +263,13 @@ public class ShopInfoDAO {
|
|||||||
}
|
}
|
||||||
return shopInfoMapper.currentShopWhetherOpen(shopId,eid);
|
return shopInfoMapper.currentShopWhetherOpen(shopId,eid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 数据处理专用获取2025年4月19号之后,并且没有生成密码的门店
|
||||||
|
*/
|
||||||
|
public List<ShopInfoDO> getListByTime(){
|
||||||
|
return shopInfoMapper.getListByTime();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -418,5 +418,15 @@ public class ShopStageInfoDAO {
|
|||||||
}
|
}
|
||||||
return shopStageInfos;
|
return shopStageInfos;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 获取特定阶段 用作导出
|
||||||
|
*/
|
||||||
|
public List<ShopStageInfoDO> getShopSubStages(List<Long> shopIds) {
|
||||||
|
if (CollectionUtils.isEmpty(shopIds)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return shopStageInfoMapper.getShopSubStages(shopIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
import com.cool.store.entity.BuildInformationDO;
|
import com.cool.store.entity.BuildInformationDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author EDY
|
* @author EDY
|
||||||
@@ -12,6 +15,8 @@ import tk.mybatis.mapper.common.Mapper;
|
|||||||
*/
|
*/
|
||||||
public interface BuildInformationMapper extends Mapper<BuildInformationDO> {
|
public interface BuildInformationMapper extends Mapper<BuildInformationDO> {
|
||||||
|
|
||||||
|
List<BuildInformationDO> getSpecificByShopIdList(@Param("list") List<Long> shopIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,4 +51,6 @@ public interface HyPartnerUserInfoMapper {
|
|||||||
|
|
||||||
int updatePasswordByPartnerId(@Param("record") HyPartnerUserInfoDO record);
|
int updatePasswordByPartnerId(@Param("record") HyPartnerUserInfoDO record);
|
||||||
|
|
||||||
|
Integer dataHandle(@Param("list") List<HyPartnerUserInfoDO> hyPartnerUserInfoDOList);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
import com.cool.store.entity.OrderSysInfoDO;
|
import com.cool.store.entity.OrderSysInfoDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: WangShuo
|
* @Author: WangShuo
|
||||||
@@ -11,4 +14,6 @@ import tk.mybatis.mapper.common.Mapper;
|
|||||||
* @注释:
|
* @注释:
|
||||||
*/
|
*/
|
||||||
public interface OrderSysInfoMapper extends Mapper<OrderSysInfoDO> {
|
public interface OrderSysInfoMapper extends Mapper<OrderSysInfoDO> {
|
||||||
|
|
||||||
|
List<OrderSysInfoDO> getSpecificByShopIdList(@Param("list") List<Long> shopIdList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.mapper;
|
|||||||
|
|
||||||
import com.cool.store.dto.MiniShopDTO;
|
import com.cool.store.dto.MiniShopDTO;
|
||||||
import com.cool.store.dto.PCPointListDTO;
|
import com.cool.store.dto.PCPointListDTO;
|
||||||
|
import com.cool.store.dto.PointInfoDTO;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
@@ -116,4 +117,6 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
|||||||
* @description:获取全部可推荐铺位
|
* @description:获取全部可推荐铺位
|
||||||
*/
|
*/
|
||||||
List<MiniPointPageVO> getRecommendOrMyList(@Param("request") MiniPointRequest request);
|
List<MiniPointPageVO> getRecommendOrMyList(@Param("request") MiniPointRequest request);
|
||||||
|
|
||||||
|
List<PointInfoDTO> getPointAndDetailByIds(@Param("pointIds") List<Long> pointIds);
|
||||||
}
|
}
|
||||||
@@ -87,5 +87,15 @@ public interface ShopAccountMapper extends Mapper<ShopAccountDO> {
|
|||||||
List<ShopAccountDO> getALlFail();
|
List<ShopAccountDO> getALlFail();
|
||||||
|
|
||||||
|
|
||||||
|
Integer dateHandle(@Param("list") List<ShopAccountDO> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 获取特定字段
|
||||||
|
*/
|
||||||
|
List<ShopAccountDO> getSpecificByShopIds(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -137,4 +137,6 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
|||||||
|
|
||||||
MiniShopsResponse currentShopWhetherOpen(@Param("shopId")Long shopId,@Param("eid")String eid);
|
MiniShopsResponse currentShopWhetherOpen(@Param("shopId")Long shopId,@Param("eid")String eid);
|
||||||
|
|
||||||
|
List<ShopInfoDO> getListByTime();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,4 +169,6 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
List<PlatformBuildStageDTO> getPlatformBuildStage( @Param("shopIds") List<Long> shopIds);
|
List<PlatformBuildStageDTO> getPlatformBuildStage( @Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
Integer getAllNumber(@Param("shopId") Long shopId,@Param("flag")Integer flag);
|
Integer getAllNumber(@Param("shopId") Long shopId,@Param("flag")Integer flag);
|
||||||
|
|
||||||
|
List<ShopStageInfoDO> getShopSubStages(@Param("shopIds") List<Long> shopIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,4 +17,6 @@ public interface WarehouseInfoMapper extends Mapper<WarehouseInfoDO> {
|
|||||||
List<WarehouseInfoDO> getAllAndActive(@Param("keyword") String keyword);
|
List<WarehouseInfoDO> getAllAndActive(@Param("keyword") String keyword);
|
||||||
|
|
||||||
WarehouseInfoDO getByCode(@Param("code") String code);
|
WarehouseInfoDO getByCode(@Param("code") String code);
|
||||||
|
|
||||||
|
List<WarehouseInfoDO> getAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,4 +53,12 @@
|
|||||||
create_time,update_time,create_user,
|
create_time,update_time,create_user,
|
||||||
update_user,c_shop_name,settler_bank_back_photo_url,settler_is_same_partner,juridical_is_same_partner
|
update_user,c_shop_name,settler_bank_back_photo_url,settler_is_same_partner,juridical_is_same_partner
|
||||||
</sql>
|
</sql>
|
||||||
|
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.BuildInformationDO">
|
||||||
|
select shop_id as shopId, c_shop_name as cShopName
|
||||||
|
from xfsg_build_information
|
||||||
|
where shop_id in
|
||||||
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -1,173 +1,193 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.cool.store.mapper.HyPartnerUserInfoMapper">
|
<mapper namespace="com.cool.store.mapper.HyPartnerUserInfoMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerUserInfoDO">
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerUserInfoDO">
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
<result column="partner_id" jdbcType="VARCHAR" property="partnerId"/>
|
||||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
|
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId"/>
|
||||||
<result column="crm_create_time" jdbcType="TIMESTAMP" property="crmCreateTime" />
|
<result column="crm_create_time" jdbcType="TIMESTAMP" property="crmCreateTime"/>
|
||||||
<result column="openid" jdbcType="VARCHAR" property="openid" />
|
<result column="openid" jdbcType="VARCHAR" property="openid"/>
|
||||||
<result column="downstream_system_salting" jdbcType="VARCHAR" property="downstreamSystemSalting" />
|
<result column="downstream_system_salting" jdbcType="VARCHAR" property="downstreamSystemSalting"/>
|
||||||
<result column="downstream_system_password" jdbcType="VARCHAR" property="downstreamSystemPassword" />
|
<result column="downstream_system_password" jdbcType="VARCHAR" property="downstreamSystemPassword"/>
|
||||||
<result column="downstream_system_secondary_password" jdbcType="VARCHAR" property="downstreamSystemSecondaryPassword" />
|
<result column="downstream_system_secondary_password" jdbcType="VARCHAR"
|
||||||
</resultMap>
|
property="downstreamSystemSecondaryPassword"/>
|
||||||
<sql id="Base_Column_List">
|
</resultMap>
|
||||||
id, partner_id, mobile, create_time, update_time, user_channel_id, crm_create_time, openid, downstream_system_salting, downstream_system_password,downstream_system_secondary_password
|
<sql id="Base_Column_List">
|
||||||
</sql>
|
id, partner_id, mobile, create_time, update_time, user_channel_id, crm_create_time, openid,
|
||||||
<select id="selectByPartnerId" resultMap="BaseResultMap" >
|
downstream_system_salting, downstream_system_password,downstream_system_secondary_password
|
||||||
select
|
</sql>
|
||||||
<include refid="Base_Column_List"></include>
|
<select id="selectByPartnerId" resultMap="BaseResultMap">
|
||||||
from xfsg_partner_user_info
|
select
|
||||||
where partner_id = #{partnerId}
|
<include refid="Base_Column_List"></include>
|
||||||
</select>
|
from xfsg_partner_user_info
|
||||||
|
where partner_id = #{partnerId}
|
||||||
<select id="selectByMobile" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from xfsg_partner_user_info
|
|
||||||
where mobile = #{mobile}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByOpenid" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from xfsg_partner_user_info
|
|
||||||
where openid = #{openid}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectByPartnerIds" resultMap="BaseResultMap" >
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"></include>
|
|
||||||
from xfsg_partner_user_info
|
|
||||||
<where>
|
|
||||||
<if test="partnerIdList!=null and partnerIdList.size>0">
|
|
||||||
<foreach collection="partnerIdList" open="and partner_id in (" close=")" separator="," item="partnerId">
|
|
||||||
#{partnerId}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectLastCrmCreateTime" resultType="java.lang.String">
|
|
||||||
SELECT crm_create_time as crmCreateTime FROM xfsg_partner_user_info ORDER BY crm_create_time desc limit 1
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
<select id="selectByMobile" resultMap="BaseResultMap">
|
||||||
insert into xfsg_partner_user_info
|
select
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<include refid="Base_Column_List"></include>
|
||||||
<if test="record.partnerId != null">
|
from xfsg_partner_user_info
|
||||||
partner_id,
|
where mobile = #{mobile}
|
||||||
</if>
|
</select>
|
||||||
<if test="record.mobile != null">
|
|
||||||
mobile,
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.userChannelId!=null">
|
|
||||||
user_channel_id,
|
|
||||||
</if>
|
|
||||||
<if test="record.ecWantShopArea!=null">
|
|
||||||
ec_want_shop_area,
|
|
||||||
</if>
|
|
||||||
<if test="record.crmCreateTime!=null">
|
|
||||||
crm_create_time,
|
|
||||||
</if>
|
|
||||||
<if test="record.openid!=null">
|
|
||||||
openid,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="record.partnerId != null">
|
|
||||||
#{record.partnerId},
|
|
||||||
</if>
|
|
||||||
<if test="record.mobile != null">
|
|
||||||
#{record.mobile},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
#{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
#{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.userChannelId != null">
|
|
||||||
#{record.userChannelId},
|
|
||||||
</if>
|
|
||||||
<if test="record.ecWantShopArea != null">
|
|
||||||
#{record.ecWantShopArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.crmCreateTime != null">
|
|
||||||
#{record.crmCreateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.openid != null">
|
|
||||||
#{record.openid},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateByPrimaryKeySelective">
|
<select id="selectByOpenid" resultMap="BaseResultMap">
|
||||||
update xfsg_partner_user_info
|
select
|
||||||
<set>
|
<include refid="Base_Column_List"></include>
|
||||||
<if test="record.partnerId != null">
|
from xfsg_partner_user_info
|
||||||
partner_id = #{record.partnerId},
|
where openid = #{openid}
|
||||||
</if>
|
</select>
|
||||||
<if test="record.mobile != null">
|
|
||||||
mobile = #{record.mobile},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime},
|
|
||||||
</if>
|
|
||||||
<if test="record.ecWantShopArea != null">
|
|
||||||
ec_want_shop_area = #{record.ecWantShopArea},
|
|
||||||
</if>
|
|
||||||
<if test="record.openid != null">
|
|
||||||
openid = #{record.openid},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{record.id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<update id="updateByPartnerId">
|
<select id="selectByPartnerIds" resultMap="BaseResultMap">
|
||||||
update xfsg_partner_user_info
|
select
|
||||||
<set>
|
<include refid="Base_Column_List"></include>
|
||||||
<if test="record.mobile != null">
|
from xfsg_partner_user_info
|
||||||
mobile = #{record.mobile},
|
<where>
|
||||||
</if>
|
<if test="partnerIdList!=null and partnerIdList.size>0">
|
||||||
<if test="record.createTime != null">
|
<foreach collection="partnerIdList" open="and partner_id in (" close=")" separator="," item="partnerId">
|
||||||
create_time = #{record.createTime},
|
#{partnerId}
|
||||||
</if>
|
</foreach>
|
||||||
<if test="record.updateTime != null">
|
</if>
|
||||||
update_time = #{record.updateTime},
|
</where>
|
||||||
</if>
|
</select>
|
||||||
</set>
|
|
||||||
where partner_id = #{record.partnerId}
|
<select id="selectLastCrmCreateTime" resultType="java.lang.String">
|
||||||
</update>
|
SELECT crm_create_time as crmCreateTime FROM xfsg_partner_user_info ORDER BY crm_create_time desc limit 1
|
||||||
<update id="updatePasswordByPartnerId">
|
</select>
|
||||||
update xfsg_partner_user_info
|
|
||||||
<set>
|
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||||
<if test="record.downstreamSystemSalting != null">
|
insert into xfsg_partner_user_info
|
||||||
downstream_system_salting = #{record.downstreamSystemSalting},
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
</if>
|
<if test="record.partnerId != null">
|
||||||
<if test="record.downstreamSystemPassword != null">
|
partner_id,
|
||||||
downstream_system_password = #{record.downstreamSystemPassword},
|
</if>
|
||||||
</if>
|
<if test="record.mobile != null">
|
||||||
<if test="record.downstreamSystemSecondaryPassword != null">
|
mobile,
|
||||||
downstream_system_secondary_password = #{record.downstreamSystemSecondaryPassword},
|
</if>
|
||||||
</if>
|
<if test="record.createTime != null">
|
||||||
<if test="record.updateTime != null">
|
create_time,
|
||||||
update_time = #{record.updateTime},
|
</if>
|
||||||
</if>
|
<if test="record.updateTime != null">
|
||||||
</set>
|
update_time,
|
||||||
where partner_id = #{record.partnerId}
|
</if>
|
||||||
</update>
|
<if test="record.userChannelId!=null">
|
||||||
|
user_channel_id,
|
||||||
|
</if>
|
||||||
|
<if test="record.ecWantShopArea!=null">
|
||||||
|
ec_want_shop_area,
|
||||||
|
</if>
|
||||||
|
<if test="record.crmCreateTime!=null">
|
||||||
|
crm_create_time,
|
||||||
|
</if>
|
||||||
|
<if test="record.openid!=null">
|
||||||
|
openid,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="record.partnerId != null">
|
||||||
|
#{record.partnerId},
|
||||||
|
</if>
|
||||||
|
<if test="record.mobile != null">
|
||||||
|
#{record.mobile},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
#{record.createTime},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
#{record.updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="record.userChannelId != null">
|
||||||
|
#{record.userChannelId},
|
||||||
|
</if>
|
||||||
|
<if test="record.ecWantShopArea != null">
|
||||||
|
#{record.ecWantShopArea},
|
||||||
|
</if>
|
||||||
|
<if test="record.crmCreateTime != null">
|
||||||
|
#{record.crmCreateTime},
|
||||||
|
</if>
|
||||||
|
<if test="record.openid != null">
|
||||||
|
#{record.openid},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateByPrimaryKeySelective">
|
||||||
|
update xfsg_partner_user_info
|
||||||
|
<set>
|
||||||
|
<if test="record.partnerId != null">
|
||||||
|
partner_id = #{record.partnerId},
|
||||||
|
</if>
|
||||||
|
<if test="record.mobile != null">
|
||||||
|
mobile = #{record.mobile},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="record.ecWantShopArea != null">
|
||||||
|
ec_want_shop_area = #{record.ecWantShopArea},
|
||||||
|
</if>
|
||||||
|
<if test="record.openid != null">
|
||||||
|
openid = #{record.openid},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{record.id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updateByPartnerId">
|
||||||
|
update xfsg_partner_user_info
|
||||||
|
<set>
|
||||||
|
<if test="record.mobile != null">
|
||||||
|
mobile = #{record.mobile},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where partner_id = #{record.partnerId}
|
||||||
|
</update>
|
||||||
|
<update id="updatePasswordByPartnerId">
|
||||||
|
update xfsg_partner_user_info
|
||||||
|
<set>
|
||||||
|
<if test="record.downstreamSystemSalting != null">
|
||||||
|
downstream_system_salting = #{record.downstreamSystemSalting},
|
||||||
|
</if>
|
||||||
|
<if test="record.downstreamSystemPassword != null">
|
||||||
|
downstream_system_password = #{record.downstreamSystemPassword},
|
||||||
|
</if>
|
||||||
|
<if test="record.downstreamSystemSecondaryPassword != null">
|
||||||
|
downstream_system_secondary_password = #{record.downstreamSystemSecondaryPassword},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where partner_id = #{record.partnerId}
|
||||||
|
</update>
|
||||||
|
<update id="dataHandle">
|
||||||
|
<foreach collection="list" item="item" separator=";">
|
||||||
|
update xfsg_partner_user_info
|
||||||
|
<set>
|
||||||
|
<if test="record.downstreamSystemSalting != null">
|
||||||
|
downstream_system_salting = #{item.downstreamSystemSalting},
|
||||||
|
</if>
|
||||||
|
<if test="record.downstreamSystemPassword != null">
|
||||||
|
downstream_system_password = #{item.downstreamSystemPassword},
|
||||||
|
</if>
|
||||||
|
<if test="record.downstreamSystemSecondaryPassword != null">
|
||||||
|
downstream_system_secondary_password = #{item.downstreamSystemSecondaryPassword},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{item.id}
|
||||||
|
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -41,4 +41,18 @@
|
|||||||
receiving_create_time, receiving_update_time, receiving_create_user, receiving_update_user,
|
receiving_create_time, receiving_update_time, receiving_create_user, receiving_update_user,
|
||||||
declare_goods_type
|
declare_goods_type
|
||||||
</sql>
|
</sql>
|
||||||
|
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.OrderSysInfoDO">
|
||||||
|
select
|
||||||
|
shop_id as shopId,
|
||||||
|
declare_goods_logistics_warehouse as declareGoodsLogisticsWarehouse,
|
||||||
|
declare_goods_type as declareGoodsType,
|
||||||
|
declare_goods_date as declareGoodsDate,
|
||||||
|
receiving_firm_name as receivingFirmName,
|
||||||
|
receiving_ms_bank_account as receivingMsBankAccount
|
||||||
|
from xfsg_order_sys_info
|
||||||
|
where shop_id in
|
||||||
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -311,6 +311,20 @@
|
|||||||
#{request.areaCode})
|
#{request.areaCode})
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getPointAndDetailByIds" resultType="com.cool.store.dto.PointInfoDTO">
|
||||||
|
select a.id as pointId,
|
||||||
|
a.province as province,
|
||||||
|
a.city as city,
|
||||||
|
a.district as district,
|
||||||
|
a.point_area as pointArea,
|
||||||
|
b.month_rent as monthRent
|
||||||
|
from xfsg_point_info a
|
||||||
|
left join xfsg_point_detail_info b on a.id = b.point_id
|
||||||
|
where a.id in
|
||||||
|
<foreach collection="pointIds" item="pointId" index="index" open="(" separator="," close=")">
|
||||||
|
#{pointId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="recyclePoint">
|
<update id="recyclePoint">
|
||||||
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status
|
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status
|
||||||
|
|||||||
@@ -158,11 +158,36 @@
|
|||||||
#{shopId}
|
#{shopId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="dateHandle">
|
||||||
|
<foreach collection="list" item="item" separator=";">
|
||||||
|
update xfsg_shop_account
|
||||||
|
<set>
|
||||||
|
<if test="record.passwordSalt != null">
|
||||||
|
password_salt = #{item.passwordSalt},
|
||||||
|
</if>
|
||||||
|
<if test="record.password != null">
|
||||||
|
password = #{item.password},
|
||||||
|
</if>
|
||||||
|
<if test="record.secondaryPassword != null">
|
||||||
|
secondary_password = #{item.secondaryPassword},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{item.id}
|
||||||
|
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="getALlFail">
|
<select id="getALlFail">
|
||||||
select * from xfsg_shop_account WHERE
|
select * from xfsg_shop_account WHERE
|
||||||
system_name in ('火码POS')
|
system_name in ('火码POS')
|
||||||
and status = 6
|
and status = 6
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getSpecificByShopIds" resultType="com.cool.store.entity.ShopAccountDO">
|
||||||
|
select shop_id as shopId,system_name as systemName,status from xfsg_shop_account
|
||||||
|
where shop_id in
|
||||||
|
<foreach collection="shopIds" item="shopId" open="(" close=")" separator=",">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -276,6 +276,8 @@
|
|||||||
select
|
select
|
||||||
a.id as id,
|
a.id as id,
|
||||||
a.line_id as lineId,
|
a.line_id as lineId,
|
||||||
|
a.point_id as pointId,
|
||||||
|
a.store_type as storeType,
|
||||||
a.shop_name as shopName,
|
a.shop_name as shopName,
|
||||||
a.want_shop_area_id as wantShopAreaId,
|
a.want_shop_area_id as wantShopAreaId,
|
||||||
a.shop_code as shopCode,
|
a.shop_code as shopCode,
|
||||||
@@ -455,6 +457,17 @@
|
|||||||
from xfsg_shop_info
|
from xfsg_shop_info
|
||||||
where deleted = 0 and line_id = #{lineId} and shop_code is not null
|
where deleted = 0 and line_id = #{lineId} and shop_code is not null
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getListByTime" resultType="com.cool.store.entity.ShopInfoDO">
|
||||||
|
select a.id as id ,
|
||||||
|
a.create_time,
|
||||||
|
a.partner_id as partnerId,
|
||||||
|
a.line_id as lineId
|
||||||
|
from xfsg_shop_info a
|
||||||
|
LEFT JOIN xfsg_partner_user_info b ON a.partner_id = b.partner_id
|
||||||
|
where
|
||||||
|
a.create_time >= '2025-04-19 00:00:00'
|
||||||
|
and b.downstream_system_salting is null;
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="batchUpdate" parameterType="list">
|
<update id="batchUpdate" parameterType="list">
|
||||||
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
||||||
|
|||||||
@@ -417,4 +417,18 @@
|
|||||||
where
|
where
|
||||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1 and shop_stage in (1,2)
|
shop_id = #{shopId} and deleted = 0 and is_terminated = 1 and shop_stage in (1,2)
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getShopSubStages" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||||
|
select shop_id as shopId,
|
||||||
|
shop_sub_stage as shopSubStage,
|
||||||
|
shop_sub_stage_status as shopSubStageStatus,
|
||||||
|
is_terminated as isTerminated,
|
||||||
|
actual_complete_time as actualCompleteTime
|
||||||
|
from xfsg_shop_stage_info where shop_stage = 2 or shop_stage = 1 or shop_sub_stage = 230 or shop_sub_stage = 240
|
||||||
|
<if test="shopIds !=null and shopIds.size()>0">
|
||||||
|
and shop_id in
|
||||||
|
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -20,4 +20,7 @@
|
|||||||
<select id="getByCode" resultType="com.cool.store.entity.WarehouseInfoDO">
|
<select id="getByCode" resultType="com.cool.store.entity.WarehouseInfoDO">
|
||||||
select * from xfsg_warehouse_info where warehouse_code = #{code}
|
select * from xfsg_warehouse_info where warehouse_code = #{code}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getAll" resultType="com.cool.store.entity.WarehouseInfoDO">
|
||||||
|
select * from xfsg_warehouse_info
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -15,6 +15,6 @@ public class DeclareGoodsDateDTO {
|
|||||||
@ApiModelProperty(value = "报货日期,例如:星期一(星期六,星期天)/每月1号")
|
@ApiModelProperty(value = "报货日期,例如:星期一(星期六,星期天)/每月1号")
|
||||||
private String declareGoods;
|
private String declareGoods;
|
||||||
|
|
||||||
@ApiModelProperty(value = "报货日期,例如:星期一(星期六,星期天)/每月1号")
|
@ApiModelProperty(value = "送货日期,例如:星期一(星期六,星期天)/每月1号")
|
||||||
private String deliverGoods;
|
private String deliverGoods;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/28/17:29
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExportFinanceDTO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = "门店编码", order = 1)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String shopCode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约门店名称", order = 2)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "所属品牌", order = 3)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String franchiseBrand;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟模式", order = 4)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String joinMode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟商姓名", order = 5)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟商手机号", order = 6)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "所属大区", order = 7)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String regionName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "督导", order = 8)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String investmentManagerName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人1姓名", order = 9)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatoryFirst;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人1手机号", order = 10)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatoryFirstMobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人1身份证号码", order = 11)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String partnershipSignatoryFirstIdCard;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人2姓名", order = 12)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatorySecond;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人2手机号", order = 13)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatorySecondMobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人2身份证号码", order = 14)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String partnershipSignatorySecondIdCard;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "合同编号", order = 15)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约时间", order = 16)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String signTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年加盟开始日期", order = 17)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String firstYearStartTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年管理费到期日期", order = 18)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String firstYearEndTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟费(含税)", order = 19)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String franchiseFee;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年度管理费(含税)", order = 20)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String firstYearManagementFee;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "设计费(含税)", order = 21)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String performanceBond;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "保证金(含税)", order = 22)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String loanMargin;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年度品牌使用费(含税)", order = 23)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String firstYearFee;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "合计缴费金额(含税)", order = 24)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String totalAmountContributions;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟费优惠原因", order = 25)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String discountReason;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "合同金额", order = 26)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String contractAmount;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "缴款人", order = 27)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String payUserName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第1次缴纳时间", order = 28)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String firstPayTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第2次缴纳时间", order = 29)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String secondPayTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第3次缴纳时间", order = 30)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String thirdPayTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第4次缴纳时间", order = 31)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String fourthPayTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "店铺地址", order = 32)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String shopAddress;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "阶段状态-缴纳加盟费/保证金", order = 33)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String franchiseFeeStageStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "阶段状态-加盟合同签约", order = 34)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String signFranchiseStageStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "阶段状态-建店资料收集", order = 35)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String buildInformationStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "当前进度", order = 36)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String currentProgress;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "状态", order = 37)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String shopStatus;
|
||||||
|
}
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/28/18:41
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExportJoinShopDTO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = "门店编码", order = 1)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String shopCode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约门店名称", order = 2)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "门店类型", order = 3)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String storeType;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟模式", order = 4)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String joinMode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟商姓名", order = 5)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟商手机号", order = 6)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "所属大区", order = 7)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String regionName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "督导", order = 8)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String investmentManagerName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人1姓名", order = 9)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatoryFirst;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人1手机号", order = 10)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatoryFirstMobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人1身份证号码", order = 11)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String partnershipSignatoryFirstIdCard;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人2姓名", order = 12)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatorySecond;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人2手机号", order = 13)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String partnershipSignatorySecondMobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约人2身份证号码", order = 14)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String partnershipSignatorySecondIdCard;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "合同编号", order = 15)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String contractCode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年加盟开始日期", order = 16)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String firstYearStartTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年管理费到期日期", order = 17)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String firstYearEndTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟费(含税)", order = 18)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String franchiseFee;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年度管理费(含税)", order = 19)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String firstYearManagementFee;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "设计费(含税)", order = 20)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String performanceBond;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "保证金(含税)", order = 21)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String loanMargin;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第一年度品牌使用费(含税)", order = 22)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String firstYearFee;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "合计缴费金额(含税)", order = 23)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String totalAmountContributions;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟费优惠原因", order = 24)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String discountReason;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "店面租金", order = 25)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String monthRent;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "省", order = 26)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "市", order = 27)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "区", order = 28)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "场地实际面积", order = 29)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "报货物流仓库", order = 30)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String declareGoodsLogisticsWarehouseName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "报货类型", order = 31)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String declareGoodsType;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "云流水报货时间", order = 32)
|
||||||
|
@ColumnWidth(35)
|
||||||
|
private String ylsDeclareGoodsTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "仓库配送时间", order = 33)
|
||||||
|
@ColumnWidth(35)
|
||||||
|
private String warehouseDeliveryTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "收款公司", order = 34)
|
||||||
|
@ColumnWidth(35)
|
||||||
|
private String receivingFirmName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "收款公司民生银行账号", order = 35)
|
||||||
|
@ColumnWidth(35)
|
||||||
|
private String receivingMsBankAccount;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "店铺地址", order = 36)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String shopAddress;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "阶段状态-建店资料收集", order = 37)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String buildInformationStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "建店资料完成时间", order = 38)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String buildInformationEndTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/28/20:11
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExportProgressDTO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = "门店编码", order = 1)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String shopCode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "签约门店名称", order = 2)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "点餐小程序门店名称", order = 3)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String miniProgramsShopName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "门店类型", order = 4)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String storeType;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "所属品牌", order = 5)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String franchiseBrand;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟模式", order = 6)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String joinMode;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟商姓名", order = 7)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟商手机号", order = 8)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "所属大区", order = 9)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String regionName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "督导", order = 10)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String investmentManagerName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "火码POS账号状态", order = 11)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String posStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "云流水账号状态", order = 12)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String ylsStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "营帐通开通状态", order = 13)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String yztStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "信发系统开通状态", order = 14)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String xfStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "新掌柜账号状态", order = 15)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String xzgStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "美团团购账号状态", order = 16)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String mtgStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "抖音团购账号", order = 17)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String dygStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "快手团购账号状态", order = 18)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String ksgStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "饿了么外卖账号状态", order = 19)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String elmStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "美团外卖账号状态", order = 20)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String mtwStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "京东外卖账号状态", order = 21)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String jdwStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "选址", order = 22)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String addressStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "租赁合同", order = 23)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String leaseStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "缴纳加盟费/保证金", order = 24)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String joinFeeStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟合同签约", order = 25)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String joinContractStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "营业执照", order = 26)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String businessLicenseStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "食品经营许可证", order = 27)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String foodLicenseStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "建店资料收集", order = 28)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String buildStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "建店资料完成时间", order = 29)
|
||||||
|
@ColumnWidth(25)
|
||||||
|
private String buildEndTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "设计阶段", order = 30)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String designStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "施工阶段", order = 31)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String constructionStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "装修验收", order = 32)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String decorationStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "培训登记", order = 33)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String trainStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "开业运营方案", order = 34)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String openPlanStatus;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "当前进度", order = 35)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String currentProgress;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "状态", order = 36)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String shopStatus;
|
||||||
|
}
|
||||||
@@ -32,7 +32,7 @@ public class FranchiseFeeDTO {
|
|||||||
private String firstYearManagementFee;
|
private String firstYearManagementFee;
|
||||||
//第一年度品牌使用费
|
//第一年度品牌使用费
|
||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
//履约保证金
|
//设计费
|
||||||
private String performanceBond;
|
private String performanceBond;
|
||||||
//组合字段
|
//组合字段
|
||||||
private String combinedField;
|
private String combinedField;
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/04/28/19:35
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PointInfoDTO {
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
private String pointArea;
|
||||||
|
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
private String monthRent;
|
||||||
|
}
|
||||||
@@ -19,6 +19,9 @@ import java.util.List;
|
|||||||
public class BranchShopResponse {
|
public class BranchShopResponse {
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
private Long pointId;
|
||||||
|
@ApiModelProperty("门店类型")
|
||||||
|
private Integer storeType;
|
||||||
@ApiModelProperty("加盟商姓名")
|
@ApiModelProperty("加盟商姓名")
|
||||||
private String username;
|
private String username;
|
||||||
@ApiModelProperty("加盟商手机号")
|
@ApiModelProperty("加盟商手机号")
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class FranchiseFeeResponse {
|
|||||||
private Date thirdYearEndTime;
|
private Date thirdYearEndTime;
|
||||||
@ApiModelProperty("第仨年度加盟费")
|
@ApiModelProperty("第仨年度加盟费")
|
||||||
private String thirdYearFee;
|
private String thirdYearFee;
|
||||||
@ApiModelProperty("履约保证金")
|
@ApiModelProperty("设计费")
|
||||||
private String performanceBond;
|
private String performanceBond;
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|||||||
@@ -18,4 +18,10 @@ public interface ExportRealizeService {
|
|||||||
|
|
||||||
|
|
||||||
void branchShopList(List<BranchShopResponse> list,ImportTaskDO importTaskDO);
|
void branchShopList(List<BranchShopResponse> list,ImportTaskDO importTaskDO);
|
||||||
|
|
||||||
|
void exportFinance(List<BranchShopResponse> list,ImportTaskDO importTaskDO);
|
||||||
|
|
||||||
|
void exportJoinShop(List<BranchShopResponse> list,ImportTaskDO importTaskDO);
|
||||||
|
|
||||||
|
void exportProgress(List<BranchShopResponse> list,ImportTaskDO importTaskDO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,4 +13,10 @@ import com.cool.store.request.*;
|
|||||||
public interface ExportService {
|
public interface ExportService {
|
||||||
|
|
||||||
Long branchShopList(BranchShopRequest request,LoginUserInfo user);
|
Long branchShopList(BranchShopRequest request,LoginUserInfo user);
|
||||||
|
|
||||||
|
//进度管理页面通用导出入口
|
||||||
|
//财务导出 //加盟开店申请 //进度确认
|
||||||
|
Long exportProgressBase(BranchShopRequest request, LoginUserInfo user, FileTypeEnum fileTypeEnum);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,8 +79,11 @@ public interface ShopAccountService {
|
|||||||
String shopCodeToYlsCode(String shopCode);
|
String shopCodeToYlsCode(String shopCode);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/4/28
|
||||||
|
* @description: 4月19号之后的门店对老数据密码,第二密码,盐值处理
|
||||||
|
*/
|
||||||
|
Boolean handleOldData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class BuildInformationServiceImpl implements BuildInformationService {
|
public class BuildInformationServiceImpl implements BuildInformationService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private WarehouseInfoMapper warehouseInfoMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private UserAuthMappingService userAuthMappingService;
|
private UserAuthMappingService userAuthMappingService;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -55,8 +57,7 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrderSysInfoDAO orderSysInfoDAO;
|
private OrderSysInfoDAO orderSysInfoDAO;
|
||||||
@Resource
|
|
||||||
private WarehouseInfoMapper warehouseInfoMapper;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BuildInformationResponse getBuildInformation(Long shopId) {
|
public BuildInformationResponse getBuildInformation(Long shopId) {
|
||||||
|
|||||||
@@ -5,11 +5,9 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
|
|
||||||
import com.cool.store.dto.ExportBranchShopDTO;
|
import com.cool.store.dto.*;
|
||||||
import com.cool.store.dto.FranchiseFeeDTO;
|
|
||||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||||
import com.cool.store.dto.PreparationScheduleDTO;
|
|
||||||
|
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
@@ -19,6 +17,7 @@ import com.cool.store.mapper.*;
|
|||||||
import com.cool.store.request.InitiatingRequest;
|
import com.cool.store.request.InitiatingRequest;
|
||||||
import com.cool.store.response.BranchShopResponse;
|
import com.cool.store.response.BranchShopResponse;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
|
import com.cool.store.utils.JSONUtils;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
||||||
@@ -26,6 +25,7 @@ import com.cool.store.utils.poi.DateUtils;
|
|||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
@@ -59,6 +59,17 @@ import static com.cool.store.utils.poi.DateUtils.*;
|
|||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ExportRealizeServiceImpl implements ExportRealizeService {
|
public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ShopAccountDAO shopaccountDAO;
|
||||||
|
@Resource
|
||||||
|
private WarehouseInfoMapper warehouseInfoMapper;
|
||||||
|
@Resource
|
||||||
|
private OrderSysInfoDAO orderSysInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private BuildInformationDAO buildInformationDAO;
|
||||||
|
@Resource
|
||||||
|
private PointInfoDAO pointInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private FranchiseFeeMapper franchiseFeeMapper;
|
private FranchiseFeeMapper franchiseFeeMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -224,7 +235,8 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
case 740:
|
case 740:
|
||||||
dto.setFranchiseFeeStageStatus("审核未通过");
|
dto.setFranchiseFeeStageStatus("审核未通过");
|
||||||
break;
|
break;
|
||||||
default: dto.setFranchiseFeeStageStatus("");
|
default:
|
||||||
|
dto.setFranchiseFeeStageStatus("");
|
||||||
}
|
}
|
||||||
Integer signFranchisesStageStatus = signFranchisesStageMap.getOrDefault(response.getShopId(), 0);
|
Integer signFranchisesStageStatus = signFranchisesStageMap.getOrDefault(response.getShopId(), 0);
|
||||||
switch (signFranchisesStageStatus) {
|
switch (signFranchisesStageStatus) {
|
||||||
@@ -237,7 +249,8 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
case 840:
|
case 840:
|
||||||
dto.setSignFranchiseStageStatus("已签约");
|
dto.setSignFranchiseStageStatus("已签约");
|
||||||
break;
|
break;
|
||||||
default: dto.setSignFranchiseStageStatus("");
|
default:
|
||||||
|
dto.setSignFranchiseStageStatus("");
|
||||||
}
|
}
|
||||||
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
|
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
|
||||||
dto.setShopStatus(response.getShopStatus());
|
dto.setShopStatus(response.getShopStatus());
|
||||||
@@ -263,6 +276,332 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Async
|
||||||
|
public void exportFinance(List<BranchShopResponse> list, ImportTaskDO importTaskDO) {
|
||||||
|
Boolean flag = Boolean.TRUE;
|
||||||
|
String url = "";
|
||||||
|
List<ExportFinanceDTO> exportList = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
List<Long> shopIds = list.stream().map(BranchShopResponse::getShopId).collect(Collectors.toList());
|
||||||
|
List<SignFranchiseDO> signFranchises = signFranchiseMapper.selectByShopIds(shopIds);
|
||||||
|
List<FranchiseFeeDTO> franchiseFees = franchiseFeeMapper.getPayTimeByShopIds(shopIds);
|
||||||
|
List<ShopStageInfoDO> franchiseFeeStages = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage());
|
||||||
|
Map<Long, Integer> franchiseFeeStageMap = franchiseFeeStages.stream().filter(o -> o.getShopId() != null).collect(Collectors.toMap(ShopStageInfoDO::getShopId, ShopStageInfoDO::getShopSubStageStatus));
|
||||||
|
List<ShopStageInfoDO> signFranchisesStages = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
|
Map<Long, Integer> signFranchisesStageMap = signFranchisesStages.stream().filter(o -> o.getShopId() != null).collect(Collectors.toMap(ShopStageInfoDO::getShopId, ShopStageInfoDO::getShopSubStageStatus));
|
||||||
|
List<ShopStageInfoDO> buildStages = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
|
Map<Long, Integer> buildStageMap = buildStages.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, ShopStageInfoDO::getShopSubStageStatus));
|
||||||
|
Map<Long, List<Date>> payTimeMap = new HashMap<>();
|
||||||
|
for (FranchiseFeeDTO dto : franchiseFees) {
|
||||||
|
List<Date> payTimeList = JsonToDate(dto.getCombinedField());
|
||||||
|
if (dto.getPayTime() != null) {
|
||||||
|
payTimeList.add(dto.getPayTime());
|
||||||
|
}
|
||||||
|
Collections.sort(payTimeList);
|
||||||
|
payTimeMap.put(dto.getShopId(), payTimeList);
|
||||||
|
}
|
||||||
|
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
||||||
|
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
||||||
|
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
||||||
|
if (signFranchises != null) {
|
||||||
|
signFranchiseMap = signFranchises.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, Function.identity()));
|
||||||
|
}
|
||||||
|
for (BranchShopResponse response : list) {
|
||||||
|
ExportFinanceDTO dto = new ExportFinanceDTO();
|
||||||
|
dto.setShopAddress(response.getShopAddress());
|
||||||
|
dto.setUsername(response.getUsername());
|
||||||
|
dto.setMobile(response.getMobile());
|
||||||
|
|
||||||
|
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId());
|
||||||
|
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
||||||
|
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
||||||
|
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
||||||
|
String total = (new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
|
||||||
|
.add(new BigInteger(franchiseFeeDTO.getFirstYearManagementFee()))
|
||||||
|
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee()))
|
||||||
|
.add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
|
||||||
|
dto.setTotalAmountContributions(total);
|
||||||
|
dto.setFranchiseFee(franchiseFeeDTO.getYearFranchiseFee());
|
||||||
|
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
||||||
|
dto.setPerformanceBond(franchiseFeeDTO.getPerformanceBond());
|
||||||
|
dto.setFirstYearManagementFee(franchiseFeeDTO.getFirstYearManagementFee());
|
||||||
|
dto.setFirstYearFee(franchiseFeeDTO.getFirstYearFee());
|
||||||
|
dto.setPayUserName(franchiseFeeDTO.getPayUserName());
|
||||||
|
dto.setDiscountReason(franchiseFeeDTO.getDiscountReason());
|
||||||
|
}
|
||||||
|
dto.setShopName(response.getShopName());
|
||||||
|
dto.setShopCode(response.getShopCode());
|
||||||
|
dto.setRegionName(response.getRegionName());
|
||||||
|
dto.setJoinMode(JoinModeEnum.getByCode(response.getJoinMode()));
|
||||||
|
dto.setFranchiseBrand(FranchiseBrandEnum.getDescByCode(response.getFranchiseBrand()));
|
||||||
|
dto.setInvestmentManagerName(response.getInvestmentManagerName());
|
||||||
|
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(response.getShopId());
|
||||||
|
if (signFranchiseDO != null) {
|
||||||
|
dto.setContractAmount(signFranchiseDO.getContractAmount());
|
||||||
|
dto.setContractCode(signFranchiseDO.getContractCode());
|
||||||
|
dto.setSignTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getCreateTime()));
|
||||||
|
dto.setPartnershipSignatoryFirst(signFranchiseDO.getPartnershipSignatoryFirst());
|
||||||
|
dto.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
|
||||||
|
}
|
||||||
|
List<Date> payTime = payTimeMap.getOrDefault(response.getShopId(), new ArrayList<>());
|
||||||
|
for (int i = 0; i < payTime.size() && i <= 3; i++) {
|
||||||
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
dto.setSecondPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
dto.setThirdPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
dto.setFourthPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Integer franchiseFeeStageStatus = franchiseFeeStageMap.getOrDefault(response.getShopId(), 0);
|
||||||
|
ShopSubStageStatusEnum franchiseFeeStageStatusEnum = ShopSubStageStatusEnum.getShopSubStageStatusEnum(franchiseFeeStageStatus);
|
||||||
|
dto.setFranchiseFeeStageStatus(franchiseFeeStageStatusEnum.getShopSubStageStatusName());
|
||||||
|
Integer signFranchisesStageStatus = signFranchisesStageMap.getOrDefault(response.getShopId(), 0);
|
||||||
|
ShopSubStageStatusEnum signFranchisesStageStatusEnum = ShopSubStageStatusEnum.getShopSubStageStatusEnum(signFranchisesStageStatus);
|
||||||
|
dto.setSignFranchiseStageStatus(signFranchisesStageStatusEnum.getShopSubStageStatusName());
|
||||||
|
Integer buildStage = buildStageMap.get(response.getShopId());
|
||||||
|
dto.setBuildInformationStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(buildStage).getShopSubStageStatusName());
|
||||||
|
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
|
||||||
|
dto.setShopStatus(response.getShopStatus());
|
||||||
|
exportList.add(dto);
|
||||||
|
}
|
||||||
|
url = easyExcelUtil.exportExcel(ExportFinanceDTO.class, exportList, null,
|
||||||
|
FileTypeEnum.EXPORT_FINANCE.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()),
|
||||||
|
FileTypeEnum.EXPORT_FINANCE.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()));
|
||||||
|
} catch (Throwable e) {
|
||||||
|
flag = Boolean.FALSE;
|
||||||
|
log.error("fileUpload upload err, originFileName={}", FileTypeEnum.EXPORT_FINANCE.getDesc(), e);
|
||||||
|
throw new ServiceException(ErrorCodeEnum.INTERNAL_SERVER_ERROR);
|
||||||
|
} finally {
|
||||||
|
if (flag) {
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.success.getCode());
|
||||||
|
importTaskDO.setFileUrl(url);
|
||||||
|
} else {
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.fail.getCode());
|
||||||
|
}
|
||||||
|
importTaskMapper.update(eid, importTaskDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Async
|
||||||
|
public void exportJoinShop(List<BranchShopResponse> list, ImportTaskDO importTaskDO) {
|
||||||
|
Boolean flag = Boolean.TRUE;
|
||||||
|
String url = "";
|
||||||
|
List<ExportJoinShopDTO> exportList = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
List<WarehouseInfoDO> warehouseInfoMapperAll = warehouseInfoMapper.getAll();
|
||||||
|
Map<String, String> warehouseInfoMap = warehouseInfoMapperAll.stream().collect(Collectors.toMap(WarehouseInfoDO::getWarehouseCode, WarehouseInfoDO::getWarehouseName));
|
||||||
|
Set<Long> pointIds = list.stream().map(BranchShopResponse::getPointId).collect(Collectors.toSet());
|
||||||
|
List<PointInfoDTO> pointInfoDOS = pointInfoDAO.getPointAndDetailByIds(new ArrayList<>(pointIds));
|
||||||
|
Map<Long, PointInfoDTO> pointInfoDOMap = pointInfoDOS.stream().collect(Collectors.toMap(PointInfoDTO::getPointId, dto -> dto));
|
||||||
|
List<Long> shopIds = list.stream().map(BranchShopResponse::getShopId).collect(Collectors.toList());
|
||||||
|
List<SignFranchiseDO> signFranchises = signFranchiseMapper.selectByShopIds(shopIds);
|
||||||
|
List<FranchiseFeeDTO> franchiseFees = franchiseFeeMapper.getPayTimeByShopIds(shopIds);
|
||||||
|
List<ShopStageInfoDO> buildStages = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
|
Map<Long, ShopStageInfoDO> buildStageMap = buildStages.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
|
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
||||||
|
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
||||||
|
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
||||||
|
if (signFranchises != null) {
|
||||||
|
signFranchiseMap = signFranchises.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, Function.identity()));
|
||||||
|
}
|
||||||
|
List<OrderSysInfoDO> orderSysInfoDOList = orderSysInfoDAO.getSpecificByShopIdList(shopIds);
|
||||||
|
Map<Long, OrderSysInfoDO> orderSysInfoDOMap = orderSysInfoDOList.stream().collect(Collectors.toMap(OrderSysInfoDO::getShopId, Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
for (BranchShopResponse response : list) {
|
||||||
|
ExportJoinShopDTO dto = new ExportJoinShopDTO();
|
||||||
|
OrderSysInfoDO orderSysInfoDO = orderSysInfoDOMap.get(response.getShopId());
|
||||||
|
if (orderSysInfoDO != null) {
|
||||||
|
dto.setDeclareGoodsType(DeclareGoodsTypeEnum.getNameByCode(orderSysInfoDO.getDeclareGoodsType()));
|
||||||
|
dto.setDeclareGoodsLogisticsWarehouseName(warehouseInfoMap.getOrDefault(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse(), ""));
|
||||||
|
if (StringUtils.isNotBlank(orderSysInfoDO.getDeclareGoodsDate())
|
||||||
|
&& !DeclareGoodsTypeEnum.SELF_PICKUP.getCode().equals(orderSysInfoDO.getDeclareGoodsType())) {
|
||||||
|
List<DeclareGoodsDateDTO> declareGoodsDates = JSONUtils.parseToListOrMap(orderSysInfoDO.getDeclareGoodsDate(), new TypeReference<List<DeclareGoodsDateDTO>>() {
|
||||||
|
});
|
||||||
|
if (CollectionUtils.isNotEmpty(declareGoodsDates)) {
|
||||||
|
StringBuilder declareGoodsTime = new StringBuilder();
|
||||||
|
StringBuilder deliverGoodsTime = new StringBuilder();
|
||||||
|
for (DeclareGoodsDateDTO declareGoodsDateDTO : declareGoodsDates) {
|
||||||
|
declareGoodsTime.append("报货日期:").append(declareGoodsDateDTO.getDeclareGoods()).append(",");
|
||||||
|
deliverGoodsTime.append("送货日期:").append(declareGoodsDateDTO.getDeliverGoods()).append(",");
|
||||||
|
}
|
||||||
|
dto.setYlsDeclareGoodsTime(declareGoodsTime.toString());
|
||||||
|
dto.setWarehouseDeliveryTime(deliverGoodsTime.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setReceivingFirmName(orderSysInfoDO.getReceivingFirmName());
|
||||||
|
dto.setReceivingMsBankAccount(orderSysInfoDO.getReceivingMsBankAccount());
|
||||||
|
}
|
||||||
|
PointInfoDTO pointInfoDTO = pointInfoDOMap.get(response.getPointId());
|
||||||
|
if (pointInfoDTO != null) {
|
||||||
|
dto.setProvince(pointInfoDTO.getProvince());
|
||||||
|
dto.setCity(pointInfoDTO.getCity());
|
||||||
|
dto.setDistrict(pointInfoDTO.getDistrict());
|
||||||
|
dto.setArea(pointInfoDTO.getPointArea());
|
||||||
|
dto.setMonthRent(pointInfoDTO.getMonthRent());
|
||||||
|
}
|
||||||
|
|
||||||
|
dto.setUsername(response.getUsername());
|
||||||
|
dto.setMobile(response.getMobile());
|
||||||
|
dto.setShopAddress(response.getShopAddress());
|
||||||
|
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId());
|
||||||
|
dto.setStoreType(StoreTypeEnum.getMessage(response.getStoreType()));
|
||||||
|
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
||||||
|
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
||||||
|
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
||||||
|
String total = (new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
|
||||||
|
.add(new BigInteger(franchiseFeeDTO.getFirstYearManagementFee()))
|
||||||
|
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee()))
|
||||||
|
.add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
|
||||||
|
dto.setTotalAmountContributions(total);
|
||||||
|
dto.setFranchiseFee(franchiseFeeDTO.getYearFranchiseFee());
|
||||||
|
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
||||||
|
dto.setPerformanceBond(franchiseFeeDTO.getPerformanceBond());
|
||||||
|
dto.setFirstYearManagementFee(franchiseFeeDTO.getFirstYearManagementFee());
|
||||||
|
dto.setFirstYearFee(franchiseFeeDTO.getFirstYearFee());
|
||||||
|
dto.setDiscountReason(franchiseFeeDTO.getDiscountReason());
|
||||||
|
}
|
||||||
|
dto.setShopName(response.getShopName());
|
||||||
|
dto.setShopCode(response.getShopCode());
|
||||||
|
dto.setRegionName(response.getRegionName());
|
||||||
|
dto.setJoinMode(JoinModeEnum.getByCode(response.getJoinMode()));
|
||||||
|
dto.setInvestmentManagerName(response.getInvestmentManagerName());
|
||||||
|
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(response.getShopId());
|
||||||
|
if (signFranchiseDO != null) {
|
||||||
|
dto.setContractCode(signFranchiseDO.getContractCode());
|
||||||
|
dto.setPartnershipSignatoryFirst(signFranchiseDO.getPartnershipSignatoryFirst());
|
||||||
|
dto.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
|
||||||
|
}
|
||||||
|
ShopStageInfoDO buildStageInfoDO = buildStageMap.get(response.getShopId());
|
||||||
|
if (buildStageInfoDO != null) {
|
||||||
|
Integer buildStage = buildStageInfoDO.getShopSubStageStatus();
|
||||||
|
dto.setBuildInformationStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(buildStage).getShopSubStageStatusName());
|
||||||
|
if (buildStageInfoDO.getIsTerminated()) {
|
||||||
|
dto.setBuildInformationEndTime(buildStageInfoDO.getActualCompleteTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exportList.add(dto);
|
||||||
|
}
|
||||||
|
url = easyExcelUtil.exportExcel(ExportJoinShopDTO.class, exportList, null,
|
||||||
|
FileTypeEnum.EXPORT_JOIN_SHOP.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()),
|
||||||
|
FileTypeEnum.EXPORT_JOIN_SHOP.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()));
|
||||||
|
} catch (Throwable e) {
|
||||||
|
flag = Boolean.FALSE;
|
||||||
|
log.error("fileUpload upload err, originFileName={}", FileTypeEnum.EXPORT_JOIN_SHOP.getDesc(), e);
|
||||||
|
throw new ServiceException(ErrorCodeEnum.INTERNAL_SERVER_ERROR);
|
||||||
|
} finally {
|
||||||
|
if (flag) {
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.success.getCode());
|
||||||
|
importTaskDO.setFileUrl(url);
|
||||||
|
} else {
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.fail.getCode());
|
||||||
|
}
|
||||||
|
importTaskMapper.update(eid, importTaskDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Async
|
||||||
|
public void exportProgress(List<BranchShopResponse> list, ImportTaskDO importTaskDO) {
|
||||||
|
Boolean flag = Boolean.TRUE;
|
||||||
|
String url = "";
|
||||||
|
List<ExportProgressDTO> exportList = new ArrayList<>();
|
||||||
|
try {
|
||||||
|
List<Long> shopIds = list.stream().map(BranchShopResponse::getShopId).collect(Collectors.toList());
|
||||||
|
List<BuildInformationDO> buildInformationDOList = buildInformationDAO.getSpecificByShopIdList(shopIds);
|
||||||
|
Map<Long, String> cShopNameMap = new HashMap<>();
|
||||||
|
for (BuildInformationDO buildInformationDO : buildInformationDOList) {
|
||||||
|
String cShopName = buildInformationDO.getCShopName();
|
||||||
|
if (StringUtils.isBlank(cShopName)) {
|
||||||
|
cShopName = "";
|
||||||
|
}
|
||||||
|
cShopNameMap.put(buildInformationDO.getShopId(), cShopName);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ShopAccountDO> shopAccountList = shopaccountDAO.getSpecificByShopIds(shopIds);
|
||||||
|
Map<Long, List<ShopAccountDO>> shopAccountMap = shopAccountList.stream().collect(Collectors.groupingBy(ShopAccountDO::getShopId, Collectors.toList()));
|
||||||
|
List<ShopStageInfoDO> shopSubStages = shopStageInfoDAO.getShopSubStages(shopIds);
|
||||||
|
Map<Long, List<ShopStageInfoDO>> shopSubStageMap = shopSubStages.stream().collect(Collectors.groupingBy(ShopStageInfoDO::getShopId, Collectors.toList()));
|
||||||
|
for (BranchShopResponse response : list) {
|
||||||
|
ExportProgressDTO dto = new ExportProgressDTO();
|
||||||
|
dto.setStoreType(StoreTypeEnum.getMessage(response.getStoreType()));
|
||||||
|
dto.setUsername(response.getUsername());
|
||||||
|
dto.setMobile(response.getMobile());
|
||||||
|
dto.setShopName(response.getShopName());
|
||||||
|
dto.setShopCode(response.getShopCode());
|
||||||
|
dto.setRegionName(response.getRegionName());
|
||||||
|
dto.setJoinMode(JoinModeEnum.getByCode(response.getJoinMode()));
|
||||||
|
dto.setFranchiseBrand(FranchiseBrandEnum.getDescByCode(response.getFranchiseBrand()));
|
||||||
|
dto.setInvestmentManagerName(response.getInvestmentManagerName());
|
||||||
|
dto.setShopStatus(response.getShopStatus());
|
||||||
|
List<ShopStageInfoDO> shopStageInfos = shopSubStageMap.get(response.getShopId());
|
||||||
|
if (CollectionUtils.isNotEmpty(shopStageInfos)) {
|
||||||
|
Map<Integer, ShopStageInfoDO> map = shopStageInfos.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, Function.identity()));
|
||||||
|
dto.setAddressStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_1.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setLeaseStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_2.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setJoinFeeStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setJoinContractStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setBusinessLicenseStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setFoodLicenseStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
ShopStageInfoDO buildStage = map.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
|
if (buildStage != null) {
|
||||||
|
dto.setBuildStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(buildStage.getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
if (buildStage.getIsTerminated()) {
|
||||||
|
dto.setBuildEndTime(buildStage.getActualCompleteTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setDesignStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setConstructionStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setDecorationStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setTrainStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_5.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setOpenPlanStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_14.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setYztStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_24.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
dto.setXfStatus(ShopSubStageStatusEnum.getShopSubStageStatusEnum(map.getOrDefault(ShopSubStageEnum.SHOP_STAGE_23.getShopSubStage(), new ShopStageInfoDO()).getShopSubStageStatus()).getShopSubStageStatusName());
|
||||||
|
}
|
||||||
|
List<ShopAccountDO> shopAccountDOS = shopAccountMap.getOrDefault(response.getShopId(), new ArrayList<>());
|
||||||
|
if (CollectionUtils.isNotEmpty(shopAccountDOS)) {
|
||||||
|
Map<String, ShopAccountDO> accountDOMap = shopAccountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, Function.identity()));
|
||||||
|
dto.setPosStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.HUOMA.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setYlsStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.YLS.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setXzgStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.XZG.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setMtgStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.MTTG.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setDygStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.DY.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setKsgStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.KS.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setElmStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.ELM.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
dto.setMtwStatus(OpenStatusEnum.getByCode(accountDOMap.getOrDefault(ShopAccountEnum.MT.getSystemName(), new ShopAccountDO()).getStatus()));
|
||||||
|
}
|
||||||
|
dto.setMiniProgramsShopName(cShopNameMap.getOrDefault(response.getShopId(), ""));
|
||||||
|
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
|
||||||
|
exportList.add(dto);
|
||||||
|
}
|
||||||
|
url = easyExcelUtil.exportExcel(ExportProgressDTO.class, exportList, null,
|
||||||
|
FileTypeEnum.EXPORT_PROGRESS.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()),
|
||||||
|
FileTypeEnum.EXPORT_PROGRESS.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()));
|
||||||
|
} catch (Throwable e) {
|
||||||
|
flag = Boolean.FALSE;
|
||||||
|
log.error("fileUpload upload err, originFileName={}", FileTypeEnum.EXPORT_PROGRESS.getDesc(), e);
|
||||||
|
throw new ServiceException(ErrorCodeEnum.INTERNAL_SERVER_ERROR);
|
||||||
|
} finally {
|
||||||
|
if (flag) {
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.success.getCode());
|
||||||
|
importTaskDO.setFileUrl(url);
|
||||||
|
} else {
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.fail.getCode());
|
||||||
|
}
|
||||||
|
importTaskMapper.update(eid, importTaskDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String toString(Object o) {
|
private String toString(Object o) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
return "";
|
return "";
|
||||||
@@ -271,7 +610,7 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<Date> JsonToDate(String json) {
|
private List<Date> JsonToDate(String json) {
|
||||||
if (StringUtils.isBlank(json)){
|
if (StringUtils.isBlank(json)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ public class ExportServiceImpl implements ExportService {
|
|||||||
private ShopService shopService;
|
private ShopService shopService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long branchShopList(BranchShopRequest request, LoginUserInfo user) {
|
public Long branchShopList(BranchShopRequest request, LoginUserInfo user) {
|
||||||
request.setPageSize(CommonConstants.MAX_EXPORT_SIZE + 100);
|
request.setPageSize(CommonConstants.MAX_EXPORT_SIZE + 100);
|
||||||
@@ -86,7 +84,7 @@ public class ExportServiceImpl implements ExportService {
|
|||||||
return CommonConstants.ZERO_LONG;
|
return CommonConstants.ZERO_LONG;
|
||||||
} else if (total > CommonConstants.MAX_EXPORT_SIZE) {
|
} else if (total > CommonConstants.MAX_EXPORT_SIZE) {
|
||||||
exportList.addAll(branchShopList.getList().subList(0, CommonConstants.MAX_EXPORT_SIZE));
|
exportList.addAll(branchShopList.getList().subList(0, CommonConstants.MAX_EXPORT_SIZE));
|
||||||
}else {
|
} else {
|
||||||
exportList.addAll(branchShopList.getList());
|
exportList.addAll(branchShopList.getList());
|
||||||
}
|
}
|
||||||
ImportTaskDO importTaskDO = new ImportTaskDO();
|
ImportTaskDO importTaskDO = new ImportTaskDO();
|
||||||
@@ -102,5 +100,42 @@ public class ExportServiceImpl implements ExportService {
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long exportProgressBase(BranchShopRequest request, LoginUserInfo user, FileTypeEnum fileTypeEnum) {
|
||||||
|
request.setPageSize(CommonConstants.ONE_SECONDS+10);
|
||||||
|
request.setPageNum(CommonConstants.ONE);
|
||||||
|
PageInfo<BranchShopResponse> branchShopList = shopService.getBranchShopList(request, user.getUserId());
|
||||||
|
long total = branchShopList.getTotal();
|
||||||
|
if (total == CommonConstants.ZERO) {
|
||||||
|
return CommonConstants.ZERO_LONG;
|
||||||
|
} else if (total > CommonConstants.ONE_SECONDS) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.EXPORT_LIMIT_1000);
|
||||||
|
}
|
||||||
|
ImportTaskDO importTaskDO = new ImportTaskDO();
|
||||||
|
importTaskDO.setStatus(ImportStatusEnum.Ongoing.getCode());
|
||||||
|
importTaskDO.setFileName(fileTypeEnum.getDesc() + DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1, new Date()));
|
||||||
|
importTaskDO.setIsImport(Boolean.FALSE);
|
||||||
|
importTaskDO.setFileType(fileTypeEnum.getFileType());
|
||||||
|
importTaskDO.setCreateUserId(user.getUserId());
|
||||||
|
importTaskDO.setCreateTime(new Date().getTime());
|
||||||
|
importTaskDO.setCreateName(user.getName());
|
||||||
|
importTaskMapper.insert(eid, importTaskDO);
|
||||||
|
switch (fileTypeEnum) {
|
||||||
|
case EXPORT_FINANCE:
|
||||||
|
exportRealizeService.exportFinance(branchShopList.getList(), importTaskDO);
|
||||||
|
break;
|
||||||
|
case EXPORT_JOIN_SHOP:
|
||||||
|
exportRealizeService.exportJoinShop(branchShopList.getList(), importTaskDO);
|
||||||
|
break;
|
||||||
|
case EXPORT_PROGRESS:
|
||||||
|
exportRealizeService.exportProgress(branchShopList.getList(), importTaskDO);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
log.error("导出类型错误");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,17 +6,16 @@ import com.cool.store.dto.AccountEntryStatusAuditDTO;
|
|||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
import com.cool.store.dto.ModifyPasswordDTO;
|
||||||
import com.cool.store.dto.ShopAccount.ShopAccountDTO;
|
import com.cool.store.dto.ShopAccount.ShopAccountDTO;
|
||||||
import com.cool.store.dto.AccountEntryStatusChangeDTO;
|
import com.cool.store.dto.AccountEntryStatusChangeDTO;
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.OldShopDO;
|
|
||||||
import com.cool.store.entity.ShopAccountDO;
|
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.request.GetPasswordDTO;
|
||||||
import com.cool.store.request.PostAndOrderRequest;
|
import com.cool.store.request.PostAndOrderRequest;
|
||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
import com.cool.store.response.MiniShopsResponse;
|
import com.cool.store.response.MiniShopsResponse;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
|
import com.cool.store.utils.PasswordUtil;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -24,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,7 +33,8 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ShopAccountServiceImpl implements ShopAccountService {
|
public class ShopAccountServiceImpl implements ShopAccountService {
|
||||||
|
@Resource
|
||||||
|
QualificationsInfoDAO qualificationsInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
ShopAccountDAO shopAccountDAO;
|
ShopAccountDAO shopAccountDAO;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -52,29 +53,31 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
PosAndOrderInfoService posAndOrderInfoService;
|
PosAndOrderInfoService posAndOrderInfoService;
|
||||||
@Resource
|
@Resource
|
||||||
OldShopDAO oldShopDAO;
|
OldShopDAO oldShopDAO;
|
||||||
|
@Resource
|
||||||
|
ThirdXinGuanJiaService thirdXinGuanJiaService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopAccountDTO> getShopAccountByShopId(Long shopId) {
|
public List<ShopAccountDTO> getShopAccountByShopId(Long shopId) {
|
||||||
if (Objects.isNull(shopId)){
|
if (Objects.isNull(shopId)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE);
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
if (Objects.isNull(shopInfo)){
|
if (Objects.isNull(shopInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
}
|
}
|
||||||
List<ShopAccountDO> shopAccountDOS = shopAccountDAO.selectByShopId(shopId);
|
List<ShopAccountDO> shopAccountDOS = shopAccountDAO.selectByShopId(shopId);
|
||||||
List<ShopAccountDTO> result= new ArrayList<>();
|
List<ShopAccountDTO> result = new ArrayList<>();
|
||||||
if (CollectionUtils.isEmpty(shopAccountDOS)){
|
if (CollectionUtils.isEmpty(shopAccountDOS)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
shopAccountDOS.forEach(x->{
|
shopAccountDOS.forEach(x -> {
|
||||||
ShopAccountDTO shopAccountDTO = new ShopAccountDTO();
|
ShopAccountDTO shopAccountDTO = new ShopAccountDTO();
|
||||||
shopAccountDTO.setBoundPhone(x.getBoundPhone());
|
shopAccountDTO.setBoundPhone(x.getBoundPhone());
|
||||||
shopAccountDTO.setShopId(x.getShopId());
|
shopAccountDTO.setShopId(x.getShopId());
|
||||||
shopAccountDTO.setSystemName(x.getSystemName());
|
shopAccountDTO.setSystemName(x.getSystemName());
|
||||||
shopAccountDTO.setAccount(x.getAccount());
|
shopAccountDTO.setAccount(x.getAccount());
|
||||||
if (ShopAccountEnum.getSpecialList().contains(x.getSystemName())){
|
if (ShopAccountEnum.getSpecialList().contains(x.getSystemName())) {
|
||||||
shopAccountDTO.setAccount(shopInfo.getShopCode());
|
shopAccountDTO.setAccount(shopInfo.getShopCode());
|
||||||
}
|
}
|
||||||
shopAccountDTO.setPassword(x.getPassword());
|
shopAccountDTO.setPassword(x.getPassword());
|
||||||
@@ -90,10 +93,10 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean modifyPassword(ModifyPasswordDTO modifyPasswordDTO){
|
public Boolean modifyPassword(ModifyPasswordDTO modifyPasswordDTO) {
|
||||||
//查询
|
//查询
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(modifyPasswordDTO.getShopId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(modifyPasswordDTO.getShopId());
|
||||||
if (Objects.isNull(shopInfo)){
|
if (Objects.isNull(shopInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
}
|
}
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(shopInfo.getPartnerId());
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(shopInfo.getPartnerId());
|
||||||
@@ -106,7 +109,7 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
List<Long> shopIdList = shopInfoDAO.getShopIdList(shopInfo.getLineId());
|
List<Long> shopIdList = shopInfoDAO.getShopIdList(shopInfo.getLineId());
|
||||||
|
|
||||||
//批量修改密码 密码盐
|
//批量修改密码 密码盐
|
||||||
shopAccountDAO.batchUpdatePasswordByShopIds(shopIdList,modifyPasswordDTO.getPassword(),modifyPasswordDTO.getSecondaryPassword(),modifyPasswordDTO.getPasswordSalt(),new Date());
|
shopAccountDAO.batchUpdatePasswordByShopIds(shopIdList, modifyPasswordDTO.getPassword(), modifyPasswordDTO.getSecondaryPassword(), modifyPasswordDTO.getPasswordSalt(), new Date());
|
||||||
|
|
||||||
//当前加盟商所有开店成功的CODE
|
//当前加盟商所有开店成功的CODE
|
||||||
List<String> shopCodeList = shopInfoDAO.getShopCodeList(shopInfo.getLineId());
|
List<String> shopCodeList = shopInfoDAO.getShopCodeList(shopInfo.getLineId());
|
||||||
@@ -121,100 +124,100 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ZxjpApiRequest getData(Long shopId, DownSystemTypeEnum systemType){
|
public ZxjpApiRequest getData(Long shopId, DownSystemTypeEnum systemType) {
|
||||||
return syncDataService.getData(shopId,systemType);
|
return syncDataService.getData(shopId, systemType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean auditAccount(AccountAuditDTO accountAuditDTO) {
|
public Boolean auditAccount(AccountAuditDTO accountAuditDTO) {
|
||||||
if (accountAuditDTO.getShopId()==null||accountAuditDTO.getAuditFlag()==null||accountAuditDTO.getShopAccountEnum()==null){
|
if (accountAuditDTO.getShopId() == null || accountAuditDTO.getAuditFlag() == null || accountAuditDTO.getShopAccountEnum() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(accountAuditDTO.getShopId());
|
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(accountAuditDTO.getShopId());
|
||||||
if (CollectionUtils.isEmpty(accountDOS)){
|
if (CollectionUtils.isEmpty(accountDOS)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||||
}
|
}
|
||||||
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
||||||
ShopAccountDO shopAccountDO = map.get(accountAuditDTO.getShopAccountEnum().getSystemName());
|
ShopAccountDO shopAccountDO = map.get(accountAuditDTO.getShopAccountEnum().getSystemName());
|
||||||
if (Objects.isNull(shopAccountDO)){
|
if (Objects.isNull(shopAccountDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||||
}
|
}
|
||||||
if (!OpenStatusEnum.OPENSTATUSENUM_2.getCode().equals(shopAccountDO.getStatus())){
|
if (!OpenStatusEnum.OPENSTATUSENUM_2.getCode().equals(shopAccountDO.getStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.CURRENT_STATUS_NOT_OPERATION);
|
throw new ServiceException(ErrorCodeEnum.CURRENT_STATUS_NOT_OPERATION);
|
||||||
}
|
}
|
||||||
//同一份数据到新管家
|
//同一份数据到新管家
|
||||||
List<String> list = new ArrayList<>(Arrays.asList(shopAccountDO.getSystemName()));
|
List<String> list = new ArrayList<>(Arrays.asList(shopAccountDO.getSystemName()));
|
||||||
if (ShopAccountEnum.YLS.equals(accountAuditDTO.getShopAccountEnum())){
|
if (ShopAccountEnum.YLS.equals(accountAuditDTO.getShopAccountEnum())) {
|
||||||
list.add(ShopAccountEnum.XZG.getSystemName());
|
list.add(ShopAccountEnum.XZG.getSystemName());
|
||||||
}
|
}
|
||||||
if (ShopAccountEnum.XZG.equals(accountAuditDTO.getShopAccountEnum())){
|
if (ShopAccountEnum.XZG.equals(accountAuditDTO.getShopAccountEnum())) {
|
||||||
list.add(ShopAccountEnum.YLS.getSystemName());
|
list.add(ShopAccountEnum.YLS.getSystemName());
|
||||||
}
|
}
|
||||||
OpenStatusEnum openStatusEnum = accountAuditDTO.getAuditFlag() == 1 ? OpenStatusEnum.OPENSTATUSENUM_4 : OpenStatusEnum.OPENSTATUSENUM_3;
|
OpenStatusEnum openStatusEnum = accountAuditDTO.getAuditFlag() == 1 ? OpenStatusEnum.OPENSTATUSENUM_4 : OpenStatusEnum.OPENSTATUSENUM_3;
|
||||||
shopAccountDAO.updateStatusByShopIdAndSystemName(accountAuditDTO.getShopId(),list,openStatusEnum.getCode(),null,null);
|
shopAccountDAO.updateStatusByShopIdAndSystemName(accountAuditDTO.getShopId(), list, openStatusEnum.getCode(), null, null);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean accountEntryStatusAudit(AccountEntryStatusAuditDTO dto) {
|
public Boolean accountEntryStatusAudit(AccountEntryStatusAuditDTO dto) {
|
||||||
if (dto.getShopId()==null||dto.getAuditFlag()==null){
|
if (dto.getShopId() == null || dto.getAuditFlag() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(dto.getShopId());
|
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(dto.getShopId());
|
||||||
if (CollectionUtils.isEmpty(accountDOS)){
|
if (CollectionUtils.isEmpty(accountDOS)) {
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
}
|
}
|
||||||
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
||||||
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.HUOMA.getSystemName());
|
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.HUOMA.getSystemName());
|
||||||
if (Objects.isNull(shopAccountDO)){
|
if (Objects.isNull(shopAccountDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||||
}
|
}
|
||||||
if (!OpenStatusEnum.OPENSTATUSENUM_2.getCode().equals(shopAccountDO.getEntryStatus())){
|
if (!OpenStatusEnum.OPENSTATUSENUM_2.getCode().equals(shopAccountDO.getEntryStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.CURRENT_STATUS_NOT_OPERATION);
|
throw new ServiceException(ErrorCodeEnum.CURRENT_STATUS_NOT_OPERATION);
|
||||||
}
|
}
|
||||||
OpenStatusEnum openStatusEnum = dto.getAuditFlag() == 1 ? OpenStatusEnum.OPENSTATUSENUM_4 : OpenStatusEnum.OPENSTATUSENUM_3;
|
OpenStatusEnum openStatusEnum = dto.getAuditFlag() == 1 ? OpenStatusEnum.OPENSTATUSENUM_4 : OpenStatusEnum.OPENSTATUSENUM_3;
|
||||||
//修改进件状态
|
//修改进件状态
|
||||||
shopAccountDAO.updateEntryStatusByShopIdAndSystemName(dto.getShopId(),Arrays.asList(shopAccountDO.getSystemName()),openStatusEnum.getCode());
|
shopAccountDAO.updateEntryStatusByShopIdAndSystemName(dto.getShopId(), Arrays.asList(shopAccountDO.getSystemName()), openStatusEnum.getCode());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean accountEntryStatusChange(AccountEntryStatusChangeDTO dto) {
|
public Boolean accountEntryStatusChange(AccountEntryStatusChangeDTO dto) {
|
||||||
if (dto.getShopId()==null||dto.getEntryStatus()==null){
|
if (dto.getShopId() == null || dto.getEntryStatus() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(dto.getShopId());
|
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(dto.getShopId());
|
||||||
if (CollectionUtils.isEmpty(accountDOS)){
|
if (CollectionUtils.isEmpty(accountDOS)) {
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
}
|
}
|
||||||
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
||||||
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.HUOMA.getSystemName());
|
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.HUOMA.getSystemName());
|
||||||
if (Objects.isNull(shopAccountDO)){
|
if (Objects.isNull(shopAccountDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||||
}
|
}
|
||||||
//不是审核中 已进件 进件失败状态不支持修改
|
//不是审核中 已进件 进件失败状态不支持修改
|
||||||
if (!OpenStatusEnum.getSpecialList().contains(shopAccountDO.getEntryStatus())){
|
if (!OpenStatusEnum.getSpecialList().contains(shopAccountDO.getEntryStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.CURRENT_ENTRY_STATUS_NOT_OPERATION);
|
throw new ServiceException(ErrorCodeEnum.CURRENT_ENTRY_STATUS_NOT_OPERATION);
|
||||||
}
|
}
|
||||||
//修改进件状态
|
//修改进件状态
|
||||||
shopAccountDAO.updateEntryStatusByShopIdAndSystemName(dto.getShopId(),Arrays.asList(shopAccountDO.getSystemName()),dto.getEntryStatus());
|
shopAccountDAO.updateEntryStatusByShopIdAndSystemName(dto.getShopId(), Arrays.asList(shopAccountDO.getSystemName()), dto.getEntryStatus());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean pushData(AccountAuditDTO accountAuditDTO) {
|
public Boolean pushData(AccountAuditDTO accountAuditDTO) {
|
||||||
if (accountAuditDTO.getShopId()==null||accountAuditDTO.getShopAccountEnum()==null){
|
if (accountAuditDTO.getShopId() == null || accountAuditDTO.getShopAccountEnum() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
DownSystemTypeEnum downSystemTypeEnum = DownSystemTypeEnum.XGJ;
|
DownSystemTypeEnum downSystemTypeEnum = DownSystemTypeEnum.XGJ;
|
||||||
if ( ShopAccountEnum.HUOMA.equals(accountAuditDTO.getShopAccountEnum())){
|
if (ShopAccountEnum.HUOMA.equals(accountAuditDTO.getShopAccountEnum())) {
|
||||||
downSystemTypeEnum = DownSystemTypeEnum.POS;
|
downSystemTypeEnum = DownSystemTypeEnum.POS;
|
||||||
}
|
}
|
||||||
ZxjpApiRequest data = this.getData(accountAuditDTO.getShopId(), downSystemTypeEnum);
|
ZxjpApiRequest data = this.getData(accountAuditDTO.getShopId(), downSystemTypeEnum);
|
||||||
if (DownSystemTypeEnum.POS.equals(downSystemTypeEnum)){
|
if (DownSystemTypeEnum.POS.equals(downSystemTypeEnum)) {
|
||||||
Boolean successFlag = pushService.pushDataToPOS(data);
|
Boolean successFlag = pushService.pushDataToPOS(data);
|
||||||
OpenStatusEnum openStatusEnum = successFlag ? OpenStatusEnum.OPENSTATUSENUM_5 : OpenStatusEnum.OPENSTATUSENUM_6;
|
OpenStatusEnum openStatusEnum = successFlag ? OpenStatusEnum.OPENSTATUSENUM_5 : OpenStatusEnum.OPENSTATUSENUM_6;
|
||||||
shopAccountDAO.updateStatusByShopIdAndSystemName(accountAuditDTO.getShopId(),Arrays.asList(ShopAccountEnum.HUOMA.getSystemName()),openStatusEnum.getCode(),new Date(),null);
|
shopAccountDAO.updateStatusByShopIdAndSystemName(accountAuditDTO.getShopId(), Arrays.asList(ShopAccountEnum.HUOMA.getSystemName()), openStatusEnum.getCode(), new Date(), null);
|
||||||
//阶段完成
|
//阶段完成
|
||||||
PostAndOrderRequest postAndOrderRequest = new PostAndOrderRequest();
|
PostAndOrderRequest postAndOrderRequest = new PostAndOrderRequest();
|
||||||
postAndOrderRequest.setShopId(accountAuditDTO.getShopId());
|
postAndOrderRequest.setShopId(accountAuditDTO.getShopId());
|
||||||
@@ -222,8 +225,8 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
postAndOrderRequest.setRemark("已为您开通系统账号和密码,密码已加密,初始密码为身份证后6位,可通过加盟小程序修改密码!后续由运营经理服务,请您联系您督导或者经理添加我们运营经理微信,感谢您的配合!");
|
postAndOrderRequest.setRemark("已为您开通系统账号和密码,密码已加密,初始密码为身份证后6位,可通过加盟小程序修改密码!后续由运营经理服务,请您联系您督导或者经理添加我们运营经理微信,感谢您的配合!");
|
||||||
postAndOrderRequest.setAccount(data.getPartnerMobile());
|
postAndOrderRequest.setAccount(data.getPartnerMobile());
|
||||||
postAndOrderRequest.setPassword(data.getDownstreamSystemPassword());
|
postAndOrderRequest.setPassword(data.getDownstreamSystemPassword());
|
||||||
posAndOrderInfoService.submitOrUpdate(postAndOrderRequest,null);
|
posAndOrderInfoService.submitOrUpdate(postAndOrderRequest, null);
|
||||||
}else {
|
} else {
|
||||||
pushService.pushDataToXGJ(data);
|
pushService.pushDataToXGJ(data);
|
||||||
}
|
}
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
@@ -232,34 +235,73 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
@Override
|
@Override
|
||||||
public String shopIdToYlsCode(Long shopId) {
|
public String shopIdToYlsCode(Long shopId) {
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
if (Objects.isNull(shopInfo)){
|
if (Objects.isNull(shopInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
}
|
}
|
||||||
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(shopId);
|
List<ShopAccountDO> accountDOS = shopAccountDAO.selectByShopId(shopId);
|
||||||
if (CollectionUtils.isEmpty(accountDOS)){
|
if (CollectionUtils.isEmpty(accountDOS)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||||
}
|
}
|
||||||
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
Map<String, ShopAccountDO> map = accountDOS.stream().collect(Collectors.toMap(ShopAccountDO::getSystemName, data -> data));
|
||||||
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.YLS.getSystemName());
|
ShopAccountDO shopAccountDO = map.get(ShopAccountEnum.YLS.getSystemName());
|
||||||
if (Objects.isNull(shopAccountDO)){
|
if (Objects.isNull(shopAccountDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
throw new ServiceException(ErrorCodeEnum.SYSTEM_DATA_ERROR);
|
||||||
}
|
}
|
||||||
return StringUtil.isEmpty(shopAccountDO.getAccount())?shopInfo.getShopCode():shopAccountDO.getAccount();
|
return StringUtil.isEmpty(shopAccountDO.getAccount()) ? shopInfo.getShopCode() : shopAccountDO.getAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String shopCodeToYlsCode(String shopCode) {
|
public String shopCodeToYlsCode(String shopCode) {
|
||||||
ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreCode(shopCode);
|
ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreCode(shopCode);
|
||||||
if (!Objects.isNull(shopInfoDO)){
|
if (!Objects.isNull(shopInfoDO)) {
|
||||||
return this.shopIdToYlsCode(shopInfoDO.getId());
|
return this.shopIdToYlsCode(shopInfoDO.getId());
|
||||||
}
|
}
|
||||||
//查询老店关联表数据
|
//查询老店关联表数据
|
||||||
OldShopDO oldShopDO = oldShopDAO.getByCode(shopCode);
|
OldShopDO oldShopDO = oldShopDAO.getByCode(shopCode);
|
||||||
if (Objects.isNull(oldShopDO)){
|
if (Objects.isNull(oldShopDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.GET_YLS_CODE_FAIL);
|
throw new ServiceException(ErrorCodeEnum.GET_YLS_CODE_FAIL);
|
||||||
}
|
}
|
||||||
return oldShopDO.getYlsShopCode();
|
return oldShopDO.getYlsShopCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean handleOldData() {
|
||||||
|
List<ShopInfoDO> shopList = shopInfoDAO.getListByTime();
|
||||||
|
Map<String, List<ShopInfoDO>> shopMap = shopList.stream().collect(Collectors.groupingBy(ShopInfoDO::getPartnerId));
|
||||||
|
Set<String> partnerIds = shopList.stream().map(ShopInfoDO::getPartnerId).collect(Collectors.toSet());
|
||||||
|
Set<Long> lineIdSet = shopList.stream().map(ShopInfoDO::getLineId).collect(Collectors.toSet());
|
||||||
|
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(new ArrayList<>(partnerIds));
|
||||||
|
List<QualificationsInfoDO> qualificationsInfoDOList = qualificationsInfoDAO.getByLineIds(new ArrayList<>(lineIdSet));
|
||||||
|
Map<String, QualificationsInfoDO> qualificationsInfoDOMap = qualificationsInfoDOList.stream().collect(Collectors.toMap(QualificationsInfoDO::getPartnerId, Function.identity()));
|
||||||
|
for (HyPartnerUserInfoDO hyPartnerUserInfoDO : hyPartnerUserInfoDOS) {
|
||||||
|
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDOMap.get(hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
List<ShopInfoDO> shopInfos = shopMap.get(hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
List<Long> shopIds = shopInfos.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
|
List<ShopAccountDO> accountDOList = shopAccountDAO.getByShopIds(shopIds);
|
||||||
|
String substring = qualificationsInfoDO.getIdCardNo().substring(qualificationsInfoDO.getIdCardNo().length() - 6);
|
||||||
|
//生成密码和盐值
|
||||||
|
byte[] saltBytes = PasswordUtil.generateSalt();
|
||||||
|
String salt = PasswordUtil.bytesToHex(saltBytes);
|
||||||
|
String password = PasswordUtil.encryptPassword(substring, salt);
|
||||||
|
GetPasswordDTO getPasswordDTO = new GetPasswordDTO();
|
||||||
|
getPasswordDTO.setPassword(substring);
|
||||||
|
String downstreamSystemSecondaryPassword = thirdXinGuanJiaService.getPassword(getPasswordDTO);
|
||||||
|
// 修改用户表
|
||||||
|
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
|
||||||
|
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
|
||||||
|
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(downstreamSystemSecondaryPassword);
|
||||||
|
//循环修改 门店账户表
|
||||||
|
for (ShopAccountDO shopAccountDO : accountDOList) {
|
||||||
|
hyPartnerUserInfoDO.setDownstreamSystemPassword(shopAccountDO.getPassword());
|
||||||
|
hyPartnerUserInfoDO.setDownstreamSystemSalting(shopAccountDO.getPasswordSalt());
|
||||||
|
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(shopAccountDO.getSecondaryPassword());
|
||||||
|
}
|
||||||
|
shopAccountDAO.dateHandle(accountDOList);
|
||||||
|
}
|
||||||
|
hyPartnerUserInfoDAO.dataHandle(hyPartnerUserInfoDOS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.ExportService;
|
import com.cool.store.service.ExportService;
|
||||||
@@ -40,4 +41,19 @@ public class ExportController {
|
|||||||
public ResponseResult preparationList(@RequestBody BranchShopRequest request) {
|
public ResponseResult preparationList(@RequestBody BranchShopRequest request) {
|
||||||
return ResponseResult.success(exportService.branchShopList(request, CurrentUserHolder.getUser()));
|
return ResponseResult.success(exportService.branchShopList(request, CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
@PostMapping("/exportFinance")
|
||||||
|
@ApiOperation("财务导出")
|
||||||
|
public ResponseResult exportFinance(@RequestBody BranchShopRequest request) {
|
||||||
|
return ResponseResult.success(exportService.exportProgressBase(request, CurrentUserHolder.getUser(), FileTypeEnum.EXPORT_FINANCE));
|
||||||
|
}
|
||||||
|
@PostMapping("/exportJoinShop")
|
||||||
|
@ApiOperation("开店导出")
|
||||||
|
public ResponseResult exportJoinShop(@RequestBody BranchShopRequest request) {
|
||||||
|
return ResponseResult.success(exportService.exportProgressBase(request, CurrentUserHolder.getUser(), FileTypeEnum.EXPORT_JOIN_SHOP));
|
||||||
|
}
|
||||||
|
@PostMapping("/exportProgress")
|
||||||
|
@ApiOperation("进度导出")
|
||||||
|
public ResponseResult exportProgress(@RequestBody BranchShopRequest request) {
|
||||||
|
return ResponseResult.success(exportService.exportProgressBase(request, CurrentUserHolder.getUser(), FileTypeEnum.EXPORT_PROGRESS));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user