Merge branch 'master' into cc_2250513_api
This commit is contained in:
@@ -18,6 +18,9 @@ public enum FileTypeEnum {
|
|||||||
EXPORT_FINANCE("exportFinance","财务导出"),
|
EXPORT_FINANCE("exportFinance","财务导出"),
|
||||||
EXPORT_JOIN_SHOP("exportJoinShop","加盟开店申请"),
|
EXPORT_JOIN_SHOP("exportJoinShop","加盟开店申请"),
|
||||||
EXPORT_PROGRESS("exportProgress","进度确认"),
|
EXPORT_PROGRESS("exportProgress","进度确认"),
|
||||||
|
IMPORT_OA_OLD_SHOP_DATA_ERROR("OaOldShopDataError", "导入OA旧数据错误列表"),
|
||||||
|
IMPORT_OA_OLD_SHOP_DATA("importOaOldShopData", "导入OA旧数据"),
|
||||||
|
|
||||||
;
|
;
|
||||||
private String fileType;
|
private String fileType;
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 邵凌志
|
||||||
|
* @date 2020/12/11 18:11
|
||||||
|
*/
|
||||||
|
public enum ImportTaskStatusEnum {
|
||||||
|
|
||||||
|
|
||||||
|
SUCCESS(2, "上传成功"),
|
||||||
|
|
||||||
|
PROGRESS(1, "进行中"),
|
||||||
|
|
||||||
|
ERROR(3, "上传失败"),
|
||||||
|
|
||||||
|
PART_ERROR(4, "上传部分失败"),
|
||||||
|
;
|
||||||
|
/**
|
||||||
|
* 返回码
|
||||||
|
*/
|
||||||
|
private int code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回信息
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
ImportTaskStatusEnum(int code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.msg = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setMsg(String message) {
|
||||||
|
this.msg = message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,8 @@ public enum JoinModeEnum {
|
|||||||
FRANCHISE_DEPARTMENT(1,"加盟部加盟店"),
|
FRANCHISE_DEPARTMENT(1,"加盟部加盟店"),
|
||||||
FRANCHISE_COMPANIES(2,"加盟公司加盟店"),
|
FRANCHISE_COMPANIES(2,"加盟公司加盟店"),
|
||||||
OWN_STORE(3,"加盟公司自有店"),
|
OWN_STORE(3,"加盟公司自有店"),
|
||||||
STRONG_FRANCHISE(4,"强加盟");
|
STRONG_FRANCHISE(4,"强加盟")
|
||||||
|
;
|
||||||
private int code;
|
private int code;
|
||||||
private String desc;
|
private String desc;
|
||||||
private JoinModeEnum(int code, String desc) {
|
private JoinModeEnum(int code, String desc) {
|
||||||
|
|||||||
@@ -54,6 +54,17 @@ public class BuildInformationDAO {
|
|||||||
}
|
}
|
||||||
return buildInformationMapper.getSpecificByShopIdList(shopIdList);
|
return buildInformationMapper.getSpecificByShopIdList(shopIdList);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/12
|
||||||
|
* @description:数据处理用初始化 批量插入新数据
|
||||||
|
*/
|
||||||
|
public Integer batchInsertSpecific(List<Long> shopIds) {
|
||||||
|
if (CollectionUtils.isEmpty(shopIds)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return buildInformationMapper.batchInsertSpecific(shopIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.FranchiseFeeDO;
|
||||||
|
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/12/13:53
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class FranchiseFeeDAO {
|
||||||
|
@Resource
|
||||||
|
private FranchiseFeeMapper franchiseFeeMapper;
|
||||||
|
|
||||||
|
public Integer updateBill( List<FranchiseFeeDO> list){
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return franchiseFeeMapper.updateBill(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -106,4 +107,10 @@ public class HyPartnerUserInfoDAO {
|
|||||||
}
|
}
|
||||||
return hyPartnerUserInfoMapper.dataHandle(hyPartnerUserInfoDOList);
|
return hyPartnerUserInfoMapper.dataHandle(hyPartnerUserInfoDOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<HyPartnerUserInfoDO> selectPasswordIsNull(){
|
||||||
|
Example example = new Example(HyPartnerUserInfoDO.class);
|
||||||
|
example.createCriteria().andIsNull("downstreamSystemPassword");
|
||||||
|
return hyPartnerUserInfoMapper.selectByExample(example);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,40 @@ public class OrderSysInfoDAO {
|
|||||||
}
|
}
|
||||||
return orderSysInfoMapper.getSpecificByShopIdList(shopIdList);
|
return orderSysInfoMapper.getSpecificByShopIdList(shopIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer updateAddresseeAddress(OrderSysInfoDO orderSysInfoDO) {
|
public Integer updateAddresseeAddress(OrderSysInfoDO orderSysInfoDO) {
|
||||||
return orderSysInfoMapper.updateAddresseeAddress(orderSysInfoDO);
|
return orderSysInfoMapper.updateAddresseeAddress(orderSysInfoDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<OrderSysInfoDO> selectByShopIdList(List<Long> shopIdList) {
|
||||||
|
if (CollectionUtils.isEmpty(shopIdList)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
Example example = new Example(OrderSysInfoDO.class);
|
||||||
|
example.createCriteria().andIn("shopId", shopIdList);
|
||||||
|
return orderSysInfoMapper.selectByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/12
|
||||||
|
* @description:数据处理专用插入特定字段
|
||||||
|
*/
|
||||||
|
public Integer batchInsertSpecific(List<OrderSysInfoDO> orderSysInfoDOList) {
|
||||||
|
if (CollectionUtils.isEmpty(orderSysInfoDOList)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return orderSysInfoMapper.batchInsertSpecific(orderSysInfoDOList);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/12
|
||||||
|
* @description:数据处理专用update特定字段
|
||||||
|
*/
|
||||||
|
public Integer batchUpdateSpecific(List<OrderSysInfoDO> orderSysInfoDOList) {
|
||||||
|
if (CollectionUtils.isEmpty(orderSysInfoDOList)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return orderSysInfoMapper.batchUpdateSpecific(orderSysInfoDOList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.alibaba.excel.util.CollectionUtils;
|
||||||
|
import com.aliyun.openservices.shade.com.google.common.collect.Lists;
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.entity.PointDetailInfoDO;
|
import com.cool.store.entity.PointDetailInfoDO;
|
||||||
import com.cool.store.mapper.PointDetailInfoMapper;
|
import com.cool.store.mapper.PointDetailInfoMapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -61,10 +64,24 @@ public class PointDetailInfoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<PointDetailInfoDO> getByPointIdList(List<Long> pointIdList) {
|
public List<PointDetailInfoDO> getByPointIdList(List<Long> pointIdList) {
|
||||||
|
if (CollectionUtils.isEmpty(pointIdList)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
Example example = new Example(PointDetailInfoDO.class);
|
Example example = new Example(PointDetailInfoDO.class);
|
||||||
example.createCriteria().andIn("point_id", pointIdList);
|
example.createCriteria().andIn("pointId", pointIdList);
|
||||||
return pointDetailInfoMapper.selectByExample(example);
|
return pointDetailInfoMapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/9
|
||||||
|
* @description: 数据处理用 面积 租金
|
||||||
|
*/
|
||||||
|
public Integer updateMonthRent(List<PointDetailInfoDO> list) {
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return pointDetailInfoMapper.updateMonthRent(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,4 +156,16 @@ public class PointInfoDAO {
|
|||||||
}
|
}
|
||||||
return pointInfoMapper.getShopByOpportunityPointCode(eid,code);
|
return pointInfoMapper.getShopByOpportunityPointCode(eid,code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/9
|
||||||
|
* @description:数据处理用 省市区详细地址面积
|
||||||
|
*/
|
||||||
|
public Integer updateAddress(List<PointInfoDO> list){
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return pointInfoMapper.updateAddress(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.alibaba.excel.util.CollectionUtils;
|
||||||
import com.cool.store.entity.BuildInformationDO;
|
import com.cool.store.entity.BuildInformationDO;
|
||||||
import com.cool.store.entity.PosAndOrderInfoDO;
|
import com.cool.store.entity.PosAndOrderInfoDO;
|
||||||
import com.cool.store.mapper.PosAndOrderInfoMapper;
|
import com.cool.store.mapper.PosAndOrderInfoMapper;
|
||||||
@@ -7,6 +8,7 @@ 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.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: WangShuo
|
* @Author: WangShuo
|
||||||
@@ -40,4 +42,16 @@ public class PosAndOrderInfoDAO {
|
|||||||
example.createCriteria().andEqualTo("shopId",shopId).andEqualTo("type",type);
|
example.createCriteria().andEqualTo("shopId",shopId).andEqualTo("type",type);
|
||||||
return posAndOrderInfoMapper.selectOneByExample(example);
|
return posAndOrderInfoMapper.selectOneByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PosAndOrderInfoDO> selectListByShopIdAndType(List<Long> shopIds, Integer type) {
|
||||||
|
Example example = new Example(PosAndOrderInfoDO.class);
|
||||||
|
example.createCriteria().andIn("shopId",shopIds).andEqualTo("type",type);
|
||||||
|
return posAndOrderInfoMapper.selectByExample(example);
|
||||||
|
}
|
||||||
|
public Integer batchInsert(List<PosAndOrderInfoDO> posAndOrderInfoDOList){
|
||||||
|
if(CollectionUtils.isEmpty(posAndOrderInfoDOList)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return posAndOrderInfoMapper.batchInsert(posAndOrderInfoDOList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,4 +162,11 @@ public class ShopAccountDAO {
|
|||||||
return shopAccountMapper.getPasswordIsNull();
|
return shopAccountMapper.getPasswordIsNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//数据处理用平台账号 火马,云流水,新掌柜状态改为已完成
|
||||||
|
public Integer updateStatusDataHandle(List<Long> shopIds){
|
||||||
|
if (CollectionUtils.isEmpty(shopIds)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return shopAccountMapper.updateStatusDataHandle(shopIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,4 +284,10 @@ public class ShopInfoDAO {
|
|||||||
}
|
}
|
||||||
return shopInfoMapper.updateShopCity(list);
|
return shopInfoMapper.updateShopCity(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ShopInfoDO> selectByShopCodeList(List<String> shopCodeList){
|
||||||
|
Example example = new Example(ShopInfoDO.class);
|
||||||
|
example.createCriteria().andIn("shopCode", shopCodeList).andEqualTo("deleted", false);
|
||||||
|
return shopInfoMapper.selectByExample(example);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.dto.BuildStageDTO;
|
||||||
import com.cool.store.dto.PlatformBuildStageDTO;
|
import com.cool.store.dto.PlatformBuildStageDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
@@ -21,10 +22,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
@@ -169,6 +167,16 @@ public class ShopStageInfoDAO {
|
|||||||
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//数据处理专用
|
||||||
|
public Integer dataUpdateShopStageInfo(List<BuildStageDTO> list, ShopSubStageStatusEnum shopStageInfo) {
|
||||||
|
if (CollectionUtils.isEmpty(list) || Objects.isNull(shopStageInfo)) {
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
|
||||||
|
boolean isTerminated = shopStageInfo.isTerminated();
|
||||||
|
return shopStageInfoMapper.dataUpdateShopStageInfo(list, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量更新店铺状态
|
* 批量更新店铺状态
|
||||||
@@ -429,4 +437,24 @@ public class ShopStageInfoDAO {
|
|||||||
}
|
}
|
||||||
return shopStageInfoMapper.getShopSubStages(shopIds);
|
return shopStageInfoMapper.getShopSubStages(shopIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//数据处理专用
|
||||||
|
public Integer dataUpdateStatus(List<Long> list, ShopSubStageStatusEnum shopStageInfo) {
|
||||||
|
if (CollectionUtils.isEmpty(list) || Objects.isNull(shopStageInfo)) {
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
|
||||||
|
boolean isTerminated = shopStageInfo.isTerminated();
|
||||||
|
return shopStageInfoMapper.dataUpdateStatus(list, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||||
|
}
|
||||||
|
|
||||||
|
//数据处理专用
|
||||||
|
public Integer dataUpdateAcceptanceStatus(List<Long> list, ShopSubStageStatusEnum shopStageInfo) {
|
||||||
|
if (CollectionUtils.isEmpty(list) || Objects.isNull(shopStageInfo)) {
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR + shopStageInfo.getShopSubStageStatusName();
|
||||||
|
boolean isTerminated = shopStageInfo.isTerminated();
|
||||||
|
return shopStageInfoMapper.dataUpdateAcceptanceStatus(list, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.alibaba.excel.util.CollectionUtils;
|
||||||
|
import com.cool.store.entity.SignFranchiseDO;
|
||||||
|
import com.cool.store.mapper.SignFranchiseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/12/13:55
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class SignFranchiseDAO {
|
||||||
|
@Resource
|
||||||
|
private SignFranchiseMapper signFranchiseMapper;
|
||||||
|
|
||||||
|
public Integer updateSpecific(List<SignFranchiseDO> list){
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return signFranchiseMapper.updateSpecific(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,6 +17,8 @@ public interface BuildInformationMapper extends Mapper<BuildInformationDO> {
|
|||||||
|
|
||||||
List<BuildInformationDO> getSpecificByShopIdList(@Param("list") List<Long> shopIdList);
|
List<BuildInformationDO> getSpecificByShopIdList(@Param("list") List<Long> shopIdList);
|
||||||
|
|
||||||
|
Integer batchInsertSpecific(@Param("list") List<Long> shopIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,4 +16,12 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
|
|||||||
List<FranchiseFeeDTO> getPayTimeByShopIds(@Param("shopIds") List<Long> shopIds);
|
List<FranchiseFeeDTO> getPayTimeByShopIds(@Param("shopIds") List<Long> shopIds);
|
||||||
Integer updateDataHandleServiceV25();
|
Integer updateDataHandleServiceV25();
|
||||||
|
|
||||||
|
List<FranchiseFeeDO> getFranchiseFeeByShopIds(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/12
|
||||||
|
* @description: 数据处理修改账单
|
||||||
|
*/
|
||||||
|
Integer updateBill(@Param("list") List<FranchiseFeeDO> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
* @date 2023-05-29 03:53
|
* @date 2023-05-29 03:53
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface HyPartnerUserInfoMapper {
|
public interface HyPartnerUserInfoMapper extends tk.mybatis.mapper.common.Mapper<HyPartnerUserInfoDO> {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 默认插入方法,只会给有值的字段赋值
|
* 默认插入方法,只会给有值的字段赋值
|
||||||
|
|||||||
@@ -19,4 +19,7 @@ public interface OrderSysInfoMapper extends Mapper<OrderSysInfoDO> {
|
|||||||
|
|
||||||
Integer updateAddresseeAddress(@Param("update") OrderSysInfoDO orderSysInfoDO);
|
Integer updateAddresseeAddress(@Param("update") OrderSysInfoDO orderSysInfoDO);
|
||||||
|
|
||||||
|
Integer batchInsertSpecific(@Param("list") List<OrderSysInfoDO> orderSysInfoDOList);
|
||||||
|
|
||||||
|
Integer batchUpdateSpecific(@Param("list") List<OrderSysInfoDO> orderSysInfoDOList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.cool.store.entity.PointDetailInfoDO;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface PointDetailInfoMapper extends Mapper<PointDetailInfoDO> {
|
public interface PointDetailInfoMapper extends Mapper<PointDetailInfoDO> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,4 +28,6 @@ public interface PointDetailInfoMapper extends Mapper<PointDetailInfoDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer updatePartFieldPointDetail(@Param("update") PointDetailInfoDO update);
|
Integer updatePartFieldPointDetail(@Param("update") PointDetailInfoDO update);
|
||||||
|
|
||||||
|
Integer updateMonthRent(@Param("list") List<PointDetailInfoDO> list);
|
||||||
}
|
}
|
||||||
@@ -119,4 +119,6 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
|||||||
List<MiniPointPageVO> getRecommendOrMyList(@Param("request") MiniPointRequest request);
|
List<MiniPointPageVO> getRecommendOrMyList(@Param("request") MiniPointRequest request);
|
||||||
|
|
||||||
List<PointInfoDTO> getPointAndDetailByIds(@Param("pointIds") List<Long> pointIds);
|
List<PointInfoDTO> getPointAndDetailByIds(@Param("pointIds") List<Long> pointIds);
|
||||||
|
|
||||||
|
Integer updateAddress(List<PointInfoDO> list);
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,11 @@ package com.cool.store.mapper;
|
|||||||
|
|
||||||
import com.cool.store.entity.PosAndOrderInfoDO;
|
import com.cool.store.entity.PosAndOrderInfoDO;
|
||||||
|
|
||||||
|
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
|
||||||
* @description 针对表【xfsg_pos_and_order_info(pos/订货系统表)】的数据库操作Mapper
|
* @description 针对表【xfsg_pos_and_order_info(pos/订货系统表)】的数据库操作Mapper
|
||||||
@@ -12,6 +15,7 @@ import tk.mybatis.mapper.common.Mapper;
|
|||||||
*/
|
*/
|
||||||
public interface PosAndOrderInfoMapper extends Mapper<PosAndOrderInfoDO> {
|
public interface PosAndOrderInfoMapper extends Mapper<PosAndOrderInfoDO> {
|
||||||
|
|
||||||
|
Integer batchInsert(@Param("list") List<PosAndOrderInfoDO> posAndOrderInfoDOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public interface ShopAccountMapper extends Mapper<ShopAccountDO> {
|
|||||||
//数据处理用
|
//数据处理用
|
||||||
List<Long> getPasswordIsNull();
|
List<Long> getPasswordIsNull();
|
||||||
|
|
||||||
|
Integer updateStatusDataHandle(@Param("list") List<Long> shopIds);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.BuildStageDTO;
|
||||||
import com.cool.store.dto.PlatformBuildStageDTO;
|
import com.cool.store.dto.PlatformBuildStageDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
@@ -11,6 +12,7 @@ import com.github.pagehelper.Page;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||||
@@ -61,6 +63,10 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
|
|
||||||
|
Integer dataUpdateShopStageInfo(@Param("list") List<BuildStageDTO> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量更新阶段及审核信息
|
* 批量更新阶段及审核信息
|
||||||
* @param shopId
|
* @param shopId
|
||||||
@@ -171,4 +177,11 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
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);
|
List<ShopStageInfoDO> getShopSubStages(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
|
Integer dataUpdateStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
|
Integer dataUpdateAcceptanceStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,4 +15,12 @@ public interface SignFranchiseMapper extends Mapper<SignFranchiseDO> {
|
|||||||
|
|
||||||
List<SignFranchiseDO> selectByShopIds( @Param("list")List<Long> shopIds);
|
List<SignFranchiseDO> selectByShopIds( @Param("list")List<Long> shopIds);
|
||||||
Integer dateHandle();
|
Integer dateHandle();
|
||||||
|
|
||||||
|
List<SignFranchiseDO> selectAllByShopIds(@Param("list")List<Long> shopIds);
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/12
|
||||||
|
* @description:数据处理用修改特定字段
|
||||||
|
*/
|
||||||
|
Integer updateSpecific(@Param("list") List<SignFranchiseDO> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +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>
|
||||||
|
<insert id="batchInsertSpecific">
|
||||||
|
<foreach collection="list" item="item" index="index" separator=";">
|
||||||
|
insert into xfsg_build_information (shop_id)
|
||||||
|
VALUE(#{item})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.BuildInformationDO">
|
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.BuildInformationDO">
|
||||||
select shop_id as shopId, c_shop_name as cShopName
|
select shop_id as shopId, c_shop_name as cShopName
|
||||||
from xfsg_build_information
|
from xfsg_build_information
|
||||||
|
|||||||
@@ -6,6 +6,32 @@
|
|||||||
set first_year_fee = "6000",
|
set first_year_fee = "6000",
|
||||||
first_year_manage_fee = "7200"
|
first_year_manage_fee = "7200"
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateBill">
|
||||||
|
<foreach collection="list" item="item" index="index" separator=";">
|
||||||
|
update xfsg_franchise_fee
|
||||||
|
<set>
|
||||||
|
<if test="item.yearFranchiseFee !=null and item.yearFranchiseFee!=''">
|
||||||
|
year_franchise_fee = #{item.yearFranchiseFee},
|
||||||
|
</if>
|
||||||
|
<if test="item.firstYearManageFee !=null and item.firstYearManageFee!=''">
|
||||||
|
first_year_manage_fee = #{item.firstYearManageFee},
|
||||||
|
</if>
|
||||||
|
<if test="item.firstYearFee!=null and item.firstYearFee!=''">
|
||||||
|
first_year_fee= #{item.firstYearFee},
|
||||||
|
</if>
|
||||||
|
<if test="item.loanMargin !=null and item.loanMargin!=''">
|
||||||
|
loan_margin = #{item.loanMargin},
|
||||||
|
</if>
|
||||||
|
<if test="item.performanceBond !=null and item.performanceBond!=''">
|
||||||
|
performance_bond = #{item.performanceBond},
|
||||||
|
</if>
|
||||||
|
<if test="item.discountReason !=null and item.discountReason!=''">
|
||||||
|
discount_reason = #{item.discountReason},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where shop_id = #{item.shopId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
|
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
|
||||||
select *
|
select *
|
||||||
@@ -34,5 +60,13 @@
|
|||||||
#{shopId}
|
#{shopId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getFranchiseFeeByShopIds" resultType="com.cool.store.entity.FranchiseFeeDO">
|
||||||
|
select *
|
||||||
|
from xfsg_franchise_fee
|
||||||
|
where shop_id in
|
||||||
|
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -41,6 +41,21 @@
|
|||||||
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>
|
||||||
|
<insert id="batchInsertSpecific">
|
||||||
|
<foreach collection="list" item="item" index="index" separator=";">
|
||||||
|
insert into xfsg_order_sys_info (
|
||||||
|
shop_id,addressee_province,addressee_city,addressee_district,addressee_address,declare_goods_logistics_warehouse,receiving_ms_bank_account)
|
||||||
|
values(
|
||||||
|
#{item.shopId},
|
||||||
|
#{item.addresseeProvince},
|
||||||
|
#{item.addresseeCity},
|
||||||
|
#{item.addresseeDistrict},
|
||||||
|
#{item.addresseeAddress},
|
||||||
|
#{item.declareGoodsLogisticsWarehouse},
|
||||||
|
#{item.receivingMsBankAccount}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
<update id="updateAddresseeAddress">
|
<update id="updateAddresseeAddress">
|
||||||
update xfsg_order_sys_info
|
update xfsg_order_sys_info
|
||||||
<set>
|
<set>
|
||||||
@@ -59,6 +74,33 @@
|
|||||||
</set>
|
</set>
|
||||||
where shop_id = #{update.shopId}
|
where shop_id = #{update.shopId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="batchUpdateSpecific">
|
||||||
|
<foreach collection="list" separator=";" index="index" item="item">
|
||||||
|
update xfsg_order_sys_info
|
||||||
|
<set>
|
||||||
|
<if test="item.addresseeAddress != null and item.addresseeAddress != ''">
|
||||||
|
addressee_address = #{item.addresseeAddress},
|
||||||
|
</if>
|
||||||
|
<if test="item.addresseeProvince !=null and item.addresseeProvince != ''">
|
||||||
|
addressee_province = #{item.addresseeProvince},
|
||||||
|
</if>
|
||||||
|
<if test="item.addresseeCity !=null and item.addresseeCity != ''">
|
||||||
|
addressee_city = #{item.addresseeCity},
|
||||||
|
</if>
|
||||||
|
<if test="item.addresseeDistrict !=null and item.addresseeDistrict != ''">
|
||||||
|
addressee_district = #{item.addresseeDistrict},
|
||||||
|
</if>
|
||||||
|
<if test="item.declareGoodsLogisticsWarehouse !=null and item.declareGoodsLogisticsWarehouse != ''">
|
||||||
|
declare_goods_logistics_warehouse = #{item.declareGoodsLogisticsWarehouse},
|
||||||
|
</if>
|
||||||
|
<if test="item.receivingMsBankAccount !=null and item.receivingMsBankAccount != ''">
|
||||||
|
receiving_ms_bank_account = #{item.receivingMsBankAccount},
|
||||||
|
</if>
|
||||||
|
order_update_time = now()
|
||||||
|
</set>
|
||||||
|
where shop_id = #{item.shopId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.OrderSysInfoDO">
|
<select id="getSpecificByShopIdList" resultType="com.cool.store.entity.OrderSysInfoDO">
|
||||||
select
|
select
|
||||||
shop_id as shopId,
|
shop_id as shopId,
|
||||||
|
|||||||
@@ -130,5 +130,17 @@
|
|||||||
picture_obj = #{update.pictureObj}
|
picture_obj = #{update.pictureObj}
|
||||||
where id = #{update.id}
|
where id = #{update.id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateMonthRent">
|
||||||
|
<foreach collection="list" separator=";" index="index" item="item">
|
||||||
|
update xfsg_point_detail_info
|
||||||
|
<set>
|
||||||
|
<if test="item.monthRent != null">
|
||||||
|
month_rent = #{item.monthRent},
|
||||||
|
</if>
|
||||||
|
update_time = now()
|
||||||
|
</set>
|
||||||
|
where id = #{item.id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -80,7 +80,8 @@
|
|||||||
left join store_${eid} c on b.shop_code = c.store_num
|
left join store_${eid} c on b.shop_code = c.store_num
|
||||||
where a.deleted = 0 and a.development_manager = #{request.developmentManager}
|
where a.deleted = 0 and a.development_manager = #{request.developmentManager}
|
||||||
<if test="request.keyword != null and request.keyword != ''">
|
<if test="request.keyword != null and request.keyword != ''">
|
||||||
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%', #{request.keyword},
|
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
|
||||||
|
#{request.keyword},
|
||||||
'%'))
|
'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.developmentStartTime != null and request.developmentStartTime != ''">
|
<if test="request.developmentStartTime != null and request.developmentStartTime != ''">
|
||||||
@@ -114,7 +115,8 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||||
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code = #{request.areaCode})
|
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
||||||
|
#{request.areaCode})
|
||||||
</if>
|
</if>
|
||||||
order by a.id desc
|
order by a.id desc
|
||||||
</select>
|
</select>
|
||||||
@@ -185,7 +187,8 @@
|
|||||||
left join store_${eid} c on b.shop_code = c.store_num
|
left join store_${eid} c on b.shop_code = c.store_num
|
||||||
where a.deleted = 0 and a.point_status in (4,5,6,7)
|
where a.deleted = 0 and a.point_status in (4,5,6,7)
|
||||||
<if test="request.keyword != null and request.keyword != ''">
|
<if test="request.keyword != null and request.keyword != ''">
|
||||||
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%', #{request.keyword},
|
and (a.point_code like concat('%', #{request.keyword}, '%') or a.point_name like concat('%',
|
||||||
|
#{request.keyword},
|
||||||
'%'))
|
'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.developmentManager != null and request.developmentManager != ''">
|
<if test="request.developmentManager != null and request.developmentManager != ''">
|
||||||
@@ -216,7 +219,8 @@
|
|||||||
and a.storage_status = #{request.storageStatus}
|
and a.storage_status = #{request.storageStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="request.areaCode!=null and request.areaCode!=''">
|
<if test="request.areaCode!=null and request.areaCode!=''">
|
||||||
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code = #{request.areaCode})
|
and (a.province_code = #{request.areaCode} or a.city_code = #{request.areaCode} or a.district_code =
|
||||||
|
#{request.areaCode})
|
||||||
</if>
|
</if>
|
||||||
order by a.id desc
|
order by a.id desc
|
||||||
</select>
|
</select>
|
||||||
@@ -354,5 +358,20 @@
|
|||||||
point_location = #{request.pointLocation}
|
point_location = #{request.pointLocation}
|
||||||
where id = #{request.id}
|
where id = #{request.id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateAddress">
|
||||||
|
<foreach collection="list" item="item" index="index" separator=";">
|
||||||
|
update xfsg_point_info
|
||||||
|
<set>
|
||||||
|
<if test="item.province != null and item.province !=''">province = #{item.province},</if>
|
||||||
|
<if test="item.address !=null and item.address !=''">address = #{item.address},</if>
|
||||||
|
<if test="item.city !=null and item.city !=''">city = #{item.city},</if>
|
||||||
|
<if test="item.district !=null and item.district !=''">district = #{item.district},</if>
|
||||||
|
<if test="item.pointArea !=null and item.pointArea!=''">
|
||||||
|
point_area = #{item.pointArea}
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{item.id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -20,4 +20,10 @@
|
|||||||
account,password,remark,
|
account,password,remark,
|
||||||
create_time,create_user
|
create_time,create_user
|
||||||
</sql>
|
</sql>
|
||||||
|
<insert id="batchInsert">
|
||||||
|
<foreach collection="list" separator=";" index="index" item="item">
|
||||||
|
insert into xfsg_pos_and_order_info (shop_id,type,account,password,remark,create_time,create_user)
|
||||||
|
values (#{item.shopId},#{item.type},#{item.account},#{item.password},#{item.remark},#{item.createTime},#{item.createUser})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -181,6 +181,19 @@
|
|||||||
|
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateStatusDataHandle">
|
||||||
|
|
||||||
|
update xfsg_shop_account
|
||||||
|
<set>
|
||||||
|
status = 5
|
||||||
|
</set>
|
||||||
|
where
|
||||||
|
shop_id in
|
||||||
|
<foreach collection="list" item="shopId" open="(" close=")" separator=",">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
and system_name in ('火码POS','云流水','新掌柜')
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="getALlFail">
|
<select id="getALlFail">
|
||||||
|
|||||||
@@ -501,7 +501,7 @@
|
|||||||
</update>
|
</update>
|
||||||
<update id="updateShopCity">
|
<update id="updateShopCity">
|
||||||
<foreach collection="list" item="item" index="index" separator=";">
|
<foreach collection="list" item="item" index="index" separator=";">
|
||||||
update xfsg_shop_info set province =#{item.province}, city = #{item.city}, district=#{item.district} where id = #{item.id}
|
update xfsg_shop_info set shop_name = #{item.shopName}, province =#{item.province}, city = #{item.city}, district=#{item.district}, detail_address = #{item.detailAddress} where id = #{item.id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -185,6 +185,52 @@
|
|||||||
and shop_sub_stage = #{update.shopSubStage}
|
and shop_sub_stage = #{update.shopSubStage}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="dataUpdateShopStageInfo">
|
||||||
|
<foreach collection="list" item="item" separator=";">
|
||||||
|
update
|
||||||
|
xfsg_shop_stage_info
|
||||||
|
set
|
||||||
|
shop_sub_stage_status = #{shopSubStageStatus},
|
||||||
|
is_terminated = #{isTerminated},
|
||||||
|
remark = #{remark},
|
||||||
|
actual_complete_time = #{item.endTime}
|
||||||
|
where
|
||||||
|
shop_id = #{item.shopId}
|
||||||
|
and shop_sub_stage = #{shopSubStage}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</update>
|
||||||
|
<update id="dataUpdateStatus">
|
||||||
|
update
|
||||||
|
xfsg_shop_stage_info
|
||||||
|
set
|
||||||
|
shop_sub_stage_status = #{shopSubStageStatus},
|
||||||
|
is_terminated = #{isTerminated},
|
||||||
|
remark = #{remark},
|
||||||
|
actual_complete_time = now()
|
||||||
|
where
|
||||||
|
shop_id in
|
||||||
|
<foreach collection=" list" open="(" separator="," close=")" item="item" index="index">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
and shop_sub_stage = #{shopSubStage}
|
||||||
|
and shop_sub_stage_status != #{shopSubStageStatus}
|
||||||
|
</update>
|
||||||
|
<update id="dataUpdateAcceptanceStatus">
|
||||||
|
update
|
||||||
|
xfsg_shop_stage_info
|
||||||
|
set
|
||||||
|
shop_sub_stage_status = #{shopSubStageStatus},
|
||||||
|
is_terminated = #{isTerminated},
|
||||||
|
remark = #{remark}
|
||||||
|
where
|
||||||
|
shop_id in
|
||||||
|
<foreach collection=" list" open="(" separator="," close=")" item="item" index="index">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
and shop_sub_stage = #{shopSubStage}
|
||||||
|
and shop_sub_stage_status = -100
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
|
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
|
||||||
select
|
select
|
||||||
|
|||||||
@@ -10,6 +10,44 @@
|
|||||||
update xfsg_sign_franchise
|
update xfsg_sign_franchise
|
||||||
set sign_type = 1
|
set sign_type = 1
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateSpecific">
|
||||||
|
<foreach collection="list" separator=";" item ="item" index="index">
|
||||||
|
update xfsg_sign_franchise
|
||||||
|
<set>
|
||||||
|
<if test="item.contractCode != null">
|
||||||
|
contract_code = #{item.contractCode},
|
||||||
|
</if>
|
||||||
|
<if test="item.contractStartTime != null">
|
||||||
|
contract_start_time = #{item.contractStartTime},
|
||||||
|
</if>
|
||||||
|
<if test="item.contractEndTime != null">
|
||||||
|
contract_end_time = #{item.contractEndTime},
|
||||||
|
</if>
|
||||||
|
<if test="item.partnershipSignatorySecond != null and item.partnershipSignatorySecond != ''">
|
||||||
|
partnership_signatory_second = #{item.partnershipSignatorySecond},
|
||||||
|
</if>
|
||||||
|
<if test="item.partnershipSignatorySecondIdNumber != null and item.partnershipSignatorySecondIdNumber!=''">
|
||||||
|
partnership_signatory_second_id_number = #{item.partnershipSignatorySecondIdNumber},
|
||||||
|
</if>
|
||||||
|
<if test="item.partnershipSignatorySecondMobile !=null and item.partnershipSignatorySecondMobile != '' ">
|
||||||
|
partnership_signatory_second_mobile = #{item.partnershipSignatorySecondMobile},
|
||||||
|
</if>
|
||||||
|
<if test="item.introductionAward !=null and item.introductionAward !=''">
|
||||||
|
introduction_award = #{item.introductionAward},
|
||||||
|
</if>
|
||||||
|
<if test="item.introduceStore !=null and item.introduceStore!=''">
|
||||||
|
introduce_store = #{item.introduceStore},
|
||||||
|
</if>
|
||||||
|
<if test="item.introducer!=null and item.introducer!=''">
|
||||||
|
introducer = #{item.introducer},
|
||||||
|
</if>
|
||||||
|
<if test="item.protectiveDistance!=null">
|
||||||
|
protective_distance = #{item.protectiveDistance},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where shop_id = #{item.shopId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
<select id="selectByShopId" resultType="com.cool.store.entity.SignFranchiseDO">
|
<select id="selectByShopId" resultType="com.cool.store.entity.SignFranchiseDO">
|
||||||
select *
|
select *
|
||||||
from xfsg_sign_franchise
|
from xfsg_sign_franchise
|
||||||
@@ -28,4 +66,11 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectAllByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
|
||||||
|
select * from xfsg_sign_franchise
|
||||||
|
where shop_id in
|
||||||
|
<foreach collection="list" open="(" separator="," close=")" item="item" index="index">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/12/14:03
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BuildStageDTO {
|
||||||
|
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
private String endTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/09/10:22
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ImportOaOldShopDataDTO {
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String shopCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约门店名称")
|
||||||
|
private String shopName;
|
||||||
|
|
||||||
|
@ApiModelProperty("省")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
@ApiModelProperty("市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ApiModelProperty("区")
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
@ApiModelProperty("门店地址")
|
||||||
|
private String shopAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("建店资料完成时间")
|
||||||
|
private String buildEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("店面租金")
|
||||||
|
private String monthRent;
|
||||||
|
@ApiModelProperty("场地实际面积")
|
||||||
|
private String pointArea;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约人2姓名")
|
||||||
|
private String partnershipSignatorySecond;
|
||||||
|
@ApiModelProperty("签约人2手机号")
|
||||||
|
private String partnershipSignatorySecondMobile;
|
||||||
|
@ApiModelProperty("签约人2身份证号")
|
||||||
|
private String partnershipSignatorySecondIdNumber;
|
||||||
|
@ApiModelProperty("合同开始日期")
|
||||||
|
private String contractStartDate;
|
||||||
|
@ApiModelProperty("合同结束日期")
|
||||||
|
private String contractEndDate;
|
||||||
|
@ApiModelProperty("合同编号")
|
||||||
|
private String contractCode;
|
||||||
|
@ApiModelProperty("保护距离(米)")
|
||||||
|
private String protectionDistance;
|
||||||
|
@ApiModelProperty("介绍人")
|
||||||
|
private String introducer;
|
||||||
|
@ApiModelProperty("介绍门店")
|
||||||
|
private String introduceStore;
|
||||||
|
@ApiModelProperty("介绍奖")
|
||||||
|
private String introductionAward;
|
||||||
|
@ApiModelProperty("报货物流仓库")
|
||||||
|
private String declareGoodsLogisticsWarehouseName;
|
||||||
|
@ApiModelProperty("收款公司民生银行账号")
|
||||||
|
private String receivingMsBankAccount;
|
||||||
|
@ApiModelProperty("云流水账号")
|
||||||
|
private String ylsAccount;
|
||||||
|
@ApiModelProperty("加盟费")
|
||||||
|
private String yearFranchiseFee;
|
||||||
|
@ApiModelProperty("管理费")
|
||||||
|
private String firstYearManageFee;
|
||||||
|
@ApiModelProperty("设计费")
|
||||||
|
private String performanceBond;
|
||||||
|
@ApiModelProperty("保证金")
|
||||||
|
private String loanMargin;
|
||||||
|
@ApiModelProperty("品牌使用管理费")
|
||||||
|
private String firstYearFee;
|
||||||
|
@ApiModelProperty("加盟费优惠原因")
|
||||||
|
private String discountReason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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/05/09/10:43
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ImportOaOldShopDataErrorDTO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = "门店编码", order = 1)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String shopCode;
|
||||||
|
@ExcelProperty(value = "错误原因", order = 2)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String errorReason;
|
||||||
|
}
|
||||||
@@ -90,8 +90,7 @@ public class AddSignFranchiseRequest {
|
|||||||
@ApiModelProperty("合同金额")
|
@ApiModelProperty("合同金额")
|
||||||
@NotBlank(message = "合同金额不能为空")
|
@NotBlank(message = "合同金额不能为空")
|
||||||
private String contractAmount;
|
private String contractAmount;
|
||||||
@ApiModelProperty("合伙签约人1")
|
@ApiModelProperty("合伙签约人1//废弃")
|
||||||
@NotBlank(message = "合伙签约人1不能为空")
|
|
||||||
private String partnershipSignatoryFirst;
|
private String partnershipSignatoryFirst;
|
||||||
@ApiModelProperty("合伙签约人2")
|
@ApiModelProperty("合伙签约人2")
|
||||||
private String partnershipSignatorySecond;
|
private String partnershipSignatorySecond;
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.entity.ImportTaskDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/09/10:12
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
public interface DataHandlerServer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/5/9
|
||||||
|
* @description: 导入OA旧数据
|
||||||
|
*/
|
||||||
|
Boolean importOaOldShopData(List<Map<String, Object>> dataMapList, String originalFilename, LoginUserInfo user,
|
||||||
|
ImportTaskDO task);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -89,4 +89,7 @@ public interface ShopAccountService {
|
|||||||
// 处理账户表没有密码的
|
// 处理账户表没有密码的
|
||||||
Boolean handleAccountPassword();
|
Boolean handleAccountPassword();
|
||||||
|
|
||||||
|
//处理老数据加盟商没有密码
|
||||||
|
Boolean handleOldDataAccount();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,13 +77,10 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
response.setShopId(shopId);
|
response.setShopId(shopId);
|
||||||
response.setShopName(shopInfo.getShopName());
|
response.setShopName(shopInfo.getShopName());
|
||||||
response.setShopCode(shopInfo.getShopCode());
|
response.setShopCode(shopInfo.getShopCode());
|
||||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
response.setProvince(shopInfo.getProvince());
|
||||||
if (Objects.nonNull(pointInfo)) {
|
response.setDistrict(shopInfo.getDistrict());
|
||||||
response.setProvince(pointInfo.getProvince());
|
response.setCity(shopInfo.getCity());
|
||||||
response.setDistrict(pointInfo.getDistrict());
|
response.setTownship(shopInfo.getDetailAddress());
|
||||||
response.setCity(pointInfo.getCity());
|
|
||||||
response.setTownship(pointInfo.getTownship());
|
|
||||||
}
|
|
||||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||||
if (Objects.nonNull(informationDO)) {
|
if (Objects.nonNull(informationDO)) {
|
||||||
extracted(response, informationDO);
|
extracted(response, informationDO);
|
||||||
@@ -127,16 +124,18 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
response.setXgjRegionName(bigRegionDO.getOrgName());
|
response.setXgjRegionName(bigRegionDO.getOrgName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(pointInfo)) {
|
|
||||||
if (StringUtils.isBlank(response.getAddresseeProvince())) {
|
if (StringUtils.isBlank(response.getAddresseeProvince())) {
|
||||||
response.setAddresseeProvince(pointInfo.getProvince());}
|
response.setAddresseeProvince(shopInfo.getProvince());
|
||||||
|
}
|
||||||
if (StringUtils.isBlank(response.getAddresseeCity())) {
|
if (StringUtils.isBlank(response.getAddresseeCity())) {
|
||||||
response.setAddresseeCity(pointInfo.getCity());}
|
response.setAddresseeCity(shopInfo.getCity());
|
||||||
|
}
|
||||||
if (StringUtils.isBlank(response.getAddresseeDistrict())) {
|
if (StringUtils.isBlank(response.getAddresseeDistrict())) {
|
||||||
response.setAddresseeDistrict(pointInfo.getDistrict());}
|
response.setAddresseeDistrict(shopInfo.getDistrict());
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(response.getAddresseeAddress())) {
|
if (StringUtils.isBlank(response.getAddresseeAddress())) {
|
||||||
response.setAddresseeAddress(shopInfo.getDetailAddress());}
|
response.setAddresseeAddress(shopInfo.getDetailAddress());
|
||||||
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,596 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.*;
|
||||||
|
import com.cool.store.dto.*;
|
||||||
|
import com.cool.store.entity.*;
|
||||||
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
|
import com.cool.store.enums.ImportTaskStatusEnum;
|
||||||
|
import com.cool.store.enums.PosAndOrderEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
|
import com.cool.store.mapper.*;
|
||||||
|
import com.cool.store.service.DataHandlerServer;
|
||||||
|
import com.cool.store.service.FranchiseFeeService;
|
||||||
|
import com.cool.store.service.PreparationService;
|
||||||
|
import com.cool.store.utils.StringUtil;
|
||||||
|
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
||||||
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.cool.store.utils.poi.DateUtils.SPECIAL_DATE_START_1;
|
||||||
|
import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/09/10:12
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class DataHandlerServerImpl implements DataHandlerServer {
|
||||||
|
@Resource
|
||||||
|
private ImportTaskMapper importTaskMapper;
|
||||||
|
@Resource
|
||||||
|
private EasyExcelUtil easyExcelUtil;
|
||||||
|
@Resource
|
||||||
|
private ShopInfoDAO shopInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private PointInfoDAO pointInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private SignFranchiseMapper signFranchiseMapper;
|
||||||
|
@Resource
|
||||||
|
private BuildInformationDAO buildInformationDAO;
|
||||||
|
@Resource
|
||||||
|
private OrderSysInfoDAO orderSysInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private FranchiseFeeMapper franchiseFeeMapper;
|
||||||
|
@Resource
|
||||||
|
private FranchiseFeeDAO franchiseFeeDAO;
|
||||||
|
@Resource
|
||||||
|
private WarehouseInfoMapper warehouseInfoMapper;
|
||||||
|
@Resource
|
||||||
|
private PreparationService preparationService;
|
||||||
|
@Resource
|
||||||
|
private PosAndOrderInfoDAO posAndOrderInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private PointDetailInfoDAO pointDetailInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private LineInfoDAO lineInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private ShopAccountDAO shopAccountDAO;
|
||||||
|
@Resource
|
||||||
|
private SignFranchiseDAO signFranchiseDAO;
|
||||||
|
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||||
|
private String eid;
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean importOaOldShopData(List<Map<String, Object>> dataMapList, String originalFilename, LoginUserInfo user, ImportTaskDO task) {
|
||||||
|
List<ImportOaOldShopDataDTO> list = new ArrayList<>();
|
||||||
|
List<ImportOaOldShopDataErrorDTO> errorList = new ArrayList<>();
|
||||||
|
ListUtils.emptyIfNull(dataMapList)
|
||||||
|
.forEach(data -> {
|
||||||
|
try {
|
||||||
|
ImportOaOldShopDataDTO dto = buildColumn(data);
|
||||||
|
list.add(dto);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("importOaOldShopData 转化dto error:{}", JSONObject.toJSONString(data));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
log.info("导入数据条数:{}", list.size());
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
log.info("导入数据转化为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
List<String> shopCodeList = list.stream().map(ImportOaOldShopDataDTO::getShopCode).collect(Collectors.toList());
|
||||||
|
Map<String, ImportOaOldShopDataDTO> dotMap = list.stream().collect(Collectors.toMap(ImportOaOldShopDataDTO::getShopCode, item -> item));
|
||||||
|
List<ShopInfoDO> shopInfoList = shopInfoDAO.selectByShopCodeList(shopCodeList);
|
||||||
|
if (CollectionUtils.isEmpty(shopInfoList)){
|
||||||
|
log.info("导入数据根据shopCode 未找到数据");
|
||||||
|
}
|
||||||
|
Map<String, ShopInfoDO> shopInfoByCodeMap = shopInfoList.stream().collect(Collectors.toMap(ShopInfoDO::getShopCode, item -> item));
|
||||||
|
List<Long> shopIds = shopInfoList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
|
List<Long> lineIdList = shopInfoList.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
//手机号
|
||||||
|
Map<Long, String> lineMobileMap = lineInfoDAO.getLineMobileMap(lineIdList);
|
||||||
|
//铺位列表
|
||||||
|
List<Long> pointIds = shopInfoList.stream().map(ShopInfoDO::getPointId).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointIds);
|
||||||
|
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||||
|
//铺位详情
|
||||||
|
List<PointDetailInfoDO> pointDetailInfoDOList = pointDetailInfoDAO.getByPointIdList(pointIds);
|
||||||
|
Map<Long, PointDetailInfoDO> pointDetailMap = pointDetailInfoDOList.stream().collect(Collectors.toMap(PointDetailInfoDO::getPointId, Function.identity()));
|
||||||
|
//合同列表
|
||||||
|
List<SignFranchiseDO> signFranchiseDOS = signFranchiseMapper.selectAllByShopIds(shopIds);
|
||||||
|
Map<Long, SignFranchiseDO> signFranchiseMap = signFranchiseDOS.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, Function.identity()));
|
||||||
|
//订货信息和总部订货收款账户表
|
||||||
|
List<OrderSysInfoDO> orderSysInfoDOS = orderSysInfoDAO.selectByShopIdList(shopIds);
|
||||||
|
Map<Long, OrderSysInfoDO> orderSysInfoMap = orderSysInfoDOS.stream().collect(Collectors.toMap(OrderSysInfoDO::getShopId, Function.identity()));
|
||||||
|
//合同阶段
|
||||||
|
List<ShopStageInfoDO> signFranchiseStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
|
Map<Long, ShopStageInfoDO> signFranchiseStageMap = signFranchiseStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
|
//建店资料收集阶段
|
||||||
|
List<ShopStageInfoDO> bulidStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
|
Map<Long, ShopStageInfoDO> bulidStageMap = bulidStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
|
//加盟费阶段
|
||||||
|
List<ShopStageInfoDO> franchiseFeeStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage());
|
||||||
|
Map<Long, ShopStageInfoDO> franchiseFeeStageMap = franchiseFeeStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
|
//加盟费账单
|
||||||
|
List<FranchiseFeeDO> franchiseFeeByShopIds = franchiseFeeMapper.getFranchiseFeeByShopIds(shopIds);
|
||||||
|
Map<Long, FranchiseFeeDO> franchiseFeeMap = franchiseFeeByShopIds.stream().collect(Collectors.toMap(FranchiseFeeDO::getShopId, Function.identity()));
|
||||||
|
//建店资料
|
||||||
|
List<BuildInformationDO> buildInformationDOList = buildInformationDAO.getSpecificByShopIdList(shopIds);
|
||||||
|
Map<Long, BuildInformationDO> buildInformationMap = buildInformationDOList.stream().collect(Collectors.toMap(BuildInformationDO::getShopId, Function.identity()));
|
||||||
|
//初始化建店资料
|
||||||
|
List<Long> addBuildList = new ArrayList<>();
|
||||||
|
//初始化订货信息和总部订货收款账户表
|
||||||
|
List<OrderSysInfoDO> addOrderSysInfoList = new ArrayList<>();
|
||||||
|
//报货仓库
|
||||||
|
List<WarehouseInfoDO> warehouseInfoMapperAll = warehouseInfoMapper.getAll();
|
||||||
|
Map<String, String> warehouseInfoMap = warehouseInfoMapperAll.stream().collect(Collectors.toMap(WarehouseInfoDO::getWarehouseName, WarehouseInfoDO::getWarehouseCode));
|
||||||
|
//订货系统
|
||||||
|
List<PosAndOrderInfoDO> orderSysInfoDOList = posAndOrderInfoDAO.selectListByShopIdAndType(shopIds, PosAndOrderEnum.ORDER.getCode());
|
||||||
|
Map<Long, PosAndOrderInfoDO> orderSysInfoDOMap = orderSysInfoDOList.stream().collect(Collectors.toMap(PosAndOrderInfoDO::getShopId, Function.identity()));
|
||||||
|
List<PosAndOrderInfoDO> addPosAndOrderInfoList = new ArrayList<>();
|
||||||
|
//pos系统
|
||||||
|
List<PosAndOrderInfoDO> posSysInfoDOList = posAndOrderInfoDAO.selectListByShopIdAndType(shopIds, PosAndOrderEnum.POS.getCode());
|
||||||
|
Map<Long, PosAndOrderInfoDO> posSysInfoDOMap = posSysInfoDOList.stream().collect(Collectors.toMap(PosAndOrderInfoDO::getShopId, Function.identity()));
|
||||||
|
//装修阶段需要变更的shopId
|
||||||
|
List<Long> fitmentFhopIdList = new ArrayList<>();
|
||||||
|
//建店阶段完成时间
|
||||||
|
List<BuildStageDTO> updateBuildStageList = new ArrayList<>();
|
||||||
|
for (ImportOaOldShopDataDTO dto : list) {
|
||||||
|
if( !check(dto,errorList)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoByCodeMap.get(dto.getShopCode().trim());
|
||||||
|
if (Objects.isNull(shopInfoDO)) {
|
||||||
|
log.info("门店不存在,门店编码:{}", dto.getShopCode());
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("门店编码不存在");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Long shopId = shopInfoDO.getId();
|
||||||
|
ShopStageInfoDO franchiseFeeStage = franchiseFeeStageMap.get(shopId);
|
||||||
|
if (!franchiseFeeStage.getIsTerminated()) {
|
||||||
|
log.info("门店未完成加盟费阶段,门店编码:{}", dto.getShopCode());
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("门店未完成加盟费阶段");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ShopStageInfoDO signStage = signFranchiseStageMap.get(shopId);
|
||||||
|
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus().equals(signStage.getShopSubStageStatus())) {
|
||||||
|
log.info("门店未完成合同签约,门店编码:{}", dto.getShopCode());
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("门店未完成合同签约");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Date buildEndTime = DateUtils.toDate(YYYY_MM_DD, dto.getBuildEndTime());
|
||||||
|
if (Objects.isNull(buildEndTime)){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("建店资料时间转化失败");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//合同
|
||||||
|
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(shopId);
|
||||||
|
if (signFranchiseDO==null){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("合同DO不存在");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
FranchiseFeeDO franchiseFeeDO = franchiseFeeMap.get(shopId);
|
||||||
|
if (franchiseFeeDO==null){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("加盟费DO不存在");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getPartnershipSignatorySecond())) {
|
||||||
|
signFranchiseDO.setPartnershipSignatorySecond(dto.getPartnershipSignatorySecond().trim());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getPartnershipSignatorySecondMobile())) {
|
||||||
|
signFranchiseDO.setPartnershipSignatorySecondMobile(dto.getPartnershipSignatorySecondMobile().trim());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getPartnershipSignatorySecondIdNumber())) {
|
||||||
|
signFranchiseDO.setPartnershipSignatorySecondIdNumber(dto.getPartnershipSignatorySecondIdNumber());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getContractStartDate())) {
|
||||||
|
signFranchiseDO.setContractStartTime(DateUtils.toDate(YYYY_MM_DD, dto.getContractStartDate().trim()));
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getContractEndDate())) {
|
||||||
|
signFranchiseDO.setContractEndTime(DateUtils.toDate(YYYY_MM_DD, dto.getContractEndDate().trim()));
|
||||||
|
}
|
||||||
|
if ((StringUtil.isNotBlank(dto.getIntroducer()) && !"0".equals(dto.getIntroducer()))) {
|
||||||
|
signFranchiseDO.setIntroducer(dto.getIntroducer());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getIntroduceStore()) && !"0".equals(dto.getIntroduceStore())) {
|
||||||
|
signFranchiseDO.setIntroduceStore(dto.getIntroduceStore());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getIntroductionAward())) {
|
||||||
|
signFranchiseDO.setIntroductionAward(dto.getIntroductionAward());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getContractCode()) && dto.getContractCode().trim().startsWith("ZX") && dto.getContractCode().trim()!="0") {
|
||||||
|
signFranchiseDO.setContractCode(dto.getContractCode().trim());
|
||||||
|
}
|
||||||
|
if (StringUtil.isNotBlank(dto.getProtectionDistance())) {
|
||||||
|
signFranchiseDO.setProtectiveDistance((int) Double.parseDouble(dto.getProtectionDistance().trim()));
|
||||||
|
}
|
||||||
|
ShopStageInfoDO buildStage = bulidStageMap.get(shopId);
|
||||||
|
//建店资料未完成
|
||||||
|
BuildStageDTO buildStageDTO = new BuildStageDTO();
|
||||||
|
buildStageDTO.setShopId(shopId);
|
||||||
|
buildStageDTO.setEndTime(dto.getBuildEndTime()+" 00:00:00");
|
||||||
|
updateBuildStageList.add(buildStageDTO);
|
||||||
|
//建店资料阶段处理
|
||||||
|
shopStageInfoDAO.dataUpdateShopStageInfo(Collections.singletonList(buildStageDTO), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156);
|
||||||
|
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_156.getShopSubStageStatus().equals(buildStage.getShopSubStageStatus())) {
|
||||||
|
//初始化数据
|
||||||
|
preparationService.licenseCompleted(shopId);
|
||||||
|
preparationService.sysStoreCompleted(shopId);
|
||||||
|
preparationService.buildStoreAndDecorationComplete(shopId);
|
||||||
|
preparationService.selectSiteAndBuildStoreComplete(shopId);
|
||||||
|
preparationService.buildStoreComplete(shopId);
|
||||||
|
}
|
||||||
|
if (buildEndTime.before(new Date(1745164800000L))){
|
||||||
|
fitmentFhopIdList.add(shopId);
|
||||||
|
}
|
||||||
|
BuildInformationDO buildInformationDO = buildInformationMap.get(shopId);
|
||||||
|
if (Objects.isNull(buildInformationDO)) {
|
||||||
|
addBuildList.add(shopId);
|
||||||
|
}
|
||||||
|
OrderSysInfoDO orderSysInfoDO = orderSysInfoMap.get(shopId);
|
||||||
|
//报货物流仓库
|
||||||
|
String warehouseCode = warehouseInfoMap.get(dto.getDeclareGoodsLogisticsWarehouseName().trim());
|
||||||
|
if (Objects.isNull(orderSysInfoDO)) {
|
||||||
|
orderSysInfoDO = new OrderSysInfoDO();
|
||||||
|
orderSysInfoDO.setShopId(shopId);
|
||||||
|
orderSysInfoDO.setOrderCreateTime(new Date());
|
||||||
|
orderSysInfoDO.setReceivingCreateTime(new Date());
|
||||||
|
setOrderInfo(dto, orderSysInfoDO, warehouseCode);
|
||||||
|
addOrderSysInfoList.add(orderSysInfoDO);
|
||||||
|
} else {
|
||||||
|
setOrderInfo(dto, orderSysInfoDO, warehouseCode);
|
||||||
|
}
|
||||||
|
//shopInfo
|
||||||
|
shopInfoDO.setShopName(dto.getShopName().trim());
|
||||||
|
shopInfoDO.setProvince(dto.getProvince().trim());
|
||||||
|
shopInfoDO.setCity(dto.getCity().trim());
|
||||||
|
shopInfoDO.setDistrict(dto.getDistrict().trim());
|
||||||
|
shopInfoDO.setDetailAddress(dto.getShopAddress().trim());
|
||||||
|
//point
|
||||||
|
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
||||||
|
if (pointInfoDO != null) {
|
||||||
|
pointInfoDO.setProvince(dto.getProvince().trim());
|
||||||
|
pointInfoDO.setCity(dto.getCity().trim());
|
||||||
|
pointInfoDO.setDistrict(dto.getDistrict().trim());
|
||||||
|
pointInfoDO.setAddress(dto.getShopAddress().trim());
|
||||||
|
pointInfoDO.setPointArea(dto.getPointArea().trim());
|
||||||
|
}
|
||||||
|
PointDetailInfoDO pointDetailInfoDO = pointDetailMap.get(shopInfoDO.getPointId());
|
||||||
|
if (pointDetailInfoDO != null) {
|
||||||
|
if (StringUtil.isNotBlank(dto.getMonthRent())) {
|
||||||
|
pointDetailInfoDO.setMonthRent(dto.getMonthRent().trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 更新加盟费账单
|
||||||
|
franchiseFeeDO.setYearFranchiseFee(dto.getYearFranchiseFee().trim());
|
||||||
|
franchiseFeeDO.setLoanMargin(dto.getLoanMargin().trim());
|
||||||
|
franchiseFeeDO.setFirstYearFee(dto.getFirstYearFee().trim());
|
||||||
|
franchiseFeeDO.setFirstYearManageFee(dto.getFirstYearManageFee().trim());
|
||||||
|
franchiseFeeDO.setPerformanceBond(dto.getPerformanceBond().trim());
|
||||||
|
franchiseFeeDO.setDiscountReason(dto.getDiscountReason().trim());
|
||||||
|
//订货系统
|
||||||
|
PosAndOrderInfoDO order = orderSysInfoDOMap.get(shopId);
|
||||||
|
if (StringUtil.isNotBlank(dto.getYlsAccount())) {
|
||||||
|
if (Objects.isNull(order)) {
|
||||||
|
order = new PosAndOrderInfoDO();
|
||||||
|
order.setShopId(shopId);
|
||||||
|
order.setType(PosAndOrderEnum.ORDER.getCode());
|
||||||
|
order.setRemark("已为您开通订货系统账号和密码,密码已加密,初始密码为888888,可通过加盟小程序修改密码!");
|
||||||
|
order.setAccount(dto.getYlsAccount().trim());
|
||||||
|
order.setPassword("888888");
|
||||||
|
order.setCreateTime(new Date());
|
||||||
|
addPosAndOrderInfoList.add(order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//pos
|
||||||
|
PosAndOrderInfoDO posDO = posSysInfoDOMap.get(shopId);
|
||||||
|
if (Objects.isNull(posDO)){
|
||||||
|
posDO = new PosAndOrderInfoDO();
|
||||||
|
posDO.setShopId(shopId);
|
||||||
|
posDO.setType(PosAndOrderEnum.POS.getCode());
|
||||||
|
posDO.setAccount(lineMobileMap.getOrDefault(shopInfoDO.getLineId(),""));
|
||||||
|
posDO.setRemark("已为您开通POS系统账号和密码");
|
||||||
|
posDO.setCreateTime(new Date());
|
||||||
|
addPosAndOrderInfoList.add(posDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shopInfoDAO.updateShopCity(shopInfoList);
|
||||||
|
pointInfoDAO.updateAddress(pointListByIds);
|
||||||
|
pointDetailInfoDAO.updateMonthRent(pointDetailInfoDOList);
|
||||||
|
signFranchiseDAO.updateSpecific(signFranchiseDOS);
|
||||||
|
posAndOrderInfoDAO.batchInsert(addPosAndOrderInfoList);
|
||||||
|
orderSysInfoDAO.batchUpdateSpecific(orderSysInfoDOS);
|
||||||
|
orderSysInfoDAO.batchInsertSpecific(addOrderSysInfoList);
|
||||||
|
franchiseFeeDAO.updateBill(franchiseFeeByShopIds);
|
||||||
|
buildInformationDAO.batchInsertSpecific(addBuildList);
|
||||||
|
if (CollectionUtils.isNotEmpty(updateBuildStageList)){
|
||||||
|
List<Long> updateStageShopIds = updateBuildStageList.stream().map(BuildStageDTO::getShopId).collect(Collectors.toList());
|
||||||
|
//pos阶段完成
|
||||||
|
shopStageInfoDAO.dataUpdateStatus(updateStageShopIds, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_163);
|
||||||
|
// 订货阶段 完成
|
||||||
|
shopStageInfoDAO.dataUpdateStatus(updateStageShopIds, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_173);
|
||||||
|
//数据处理用平台账号 火马,云流水,新掌柜状态改为已完成
|
||||||
|
shopAccountDAO.updateStatusDataHandle(updateStageShopIds);
|
||||||
|
}
|
||||||
|
//表中4月20号后的数据,数据录入系统,新店装修阶段状态不变更 其他时间的数据状态改为已完成 不包括装修验收
|
||||||
|
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_863);
|
||||||
|
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91);
|
||||||
|
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||||
|
//装修验收初始化
|
||||||
|
shopStageInfoDAO.dataUpdateAcceptanceStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
|
||||||
|
if (!errorList.isEmpty()) {
|
||||||
|
task.setStatus(ImportTaskStatusEnum.ERROR.getCode());
|
||||||
|
String url = null ;
|
||||||
|
try {
|
||||||
|
url = easyExcelUtil.exportExcel(ImportOaOldShopDataErrorDTO.class, errorList, null,
|
||||||
|
FileTypeEnum.IMPORT_OA_OLD_SHOP_DATA_ERROR.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()),
|
||||||
|
FileTypeEnum.IMPORT_OA_OLD_SHOP_DATA_ERROR.getDesc() + DateUtils.parseDateToStr(SPECIAL_DATE_START_1, new Date()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("导出失败列表失败 errorList:{}",JSONObject.toJSONString(errorList));
|
||||||
|
}
|
||||||
|
task.setFileUrl(url);
|
||||||
|
} else {
|
||||||
|
task.setStatus(ImportTaskStatusEnum.SUCCESS.getCode());
|
||||||
|
}
|
||||||
|
task.setTotalNum(dataMapList.size());
|
||||||
|
task.setSuccessNum(dataMapList.size() - errorList.size());
|
||||||
|
importTaskMapper.update(eid,task);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean check(ImportOaOldShopDataDTO dto,List<ImportOaOldShopDataErrorDTO> errorList){
|
||||||
|
if (StringUtil.isBlank(dto.getShopCode())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("门店编码不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getShopName())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("门店名称不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getProvince())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("省不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getCity())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("市不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getDistrict())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("区不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getShopAddress())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("门店地址不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getBuildEndTime())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("建店资料完成时间不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getMonthRent())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("租金不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getPointArea())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("场地实际面积不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getContractStartDate())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("合同开始时间不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getContractEndDate())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("合同结束时间不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getYearFranchiseFee())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("加盟费不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getFirstYearManageFee())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("管理费 不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getFirstYearFee())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("品牌使用管理费不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getPerformanceBond())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("设计费不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getLoanMargin())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("保证金不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getDiscountReason())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("加盟费优惠原因不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getDeclareGoodsLogisticsWarehouseName())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("报货物流仓库不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(dto.getContractCode())){
|
||||||
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO();
|
||||||
|
errorDTO.setShopCode(dto.getShopCode());
|
||||||
|
errorDTO.setErrorReason("合同编号不能为空");
|
||||||
|
errorList.add(errorDTO);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setOrderInfo(ImportOaOldShopDataDTO dto, OrderSysInfoDO orderSysInfoDO, String warehouseCode) {
|
||||||
|
orderSysInfoDO.setAddresseeProvince(dto.getProvince().trim());
|
||||||
|
orderSysInfoDO.setAddresseeCity(dto.getCity().trim());
|
||||||
|
orderSysInfoDO.setAddresseeDistrict(dto.getDistrict().trim());
|
||||||
|
orderSysInfoDO.setAddresseeAddress(dto.getShopAddress().trim());
|
||||||
|
if (StringUtil.isNotBlank(warehouseCode)) {
|
||||||
|
orderSysInfoDO.setDeclareGoodsLogisticsWarehouse(warehouseCode);
|
||||||
|
}
|
||||||
|
orderSysInfoDO.setReceivingMsBankAccount(dto.getReceivingMsBankAccount().trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
private ImportOaOldShopDataDTO buildColumn(Map<String, Object> data) {
|
||||||
|
ImportOaOldShopDataDTO importOaOldShopDataDTO = new ImportOaOldShopDataDTO();
|
||||||
|
importOaOldShopDataDTO.setShopCode(String.valueOf(data.get("门店编码")));
|
||||||
|
importOaOldShopDataDTO.setShopName(String.valueOf(data.get("签约门店名称")));
|
||||||
|
importOaOldShopDataDTO.setProvince(String.valueOf(data.get("省")));
|
||||||
|
importOaOldShopDataDTO.setCity(String.valueOf(data.get("市")));
|
||||||
|
importOaOldShopDataDTO.setDistrict(String.valueOf(data.get("区")));
|
||||||
|
importOaOldShopDataDTO.setShopAddress(String.valueOf(data.get("门店地址")));
|
||||||
|
importOaOldShopDataDTO.setBuildEndTime(String.valueOf(data.get("建店资料完成时间")));
|
||||||
|
if (Objects.nonNull(data.get("店面租金"))){
|
||||||
|
importOaOldShopDataDTO.setMonthRent(String.valueOf(data.get("店面租金")));}
|
||||||
|
if (Objects.nonNull(data.get("场地实际面积"))){
|
||||||
|
importOaOldShopDataDTO.setPointArea(String.valueOf(data.get("场地实际面积")));}
|
||||||
|
if (Objects.nonNull(data.get("签约人2姓名"))){
|
||||||
|
importOaOldShopDataDTO.setPartnershipSignatorySecond(String.valueOf(data.get("签约人2姓名")));}
|
||||||
|
if (Objects.nonNull(data.get("签约人2电话"))){
|
||||||
|
importOaOldShopDataDTO.setPartnershipSignatorySecondMobile(String.valueOf(data.get("签约人2电话")));}
|
||||||
|
if (Objects.nonNull(data.get("签约人2身份证号码"))){
|
||||||
|
importOaOldShopDataDTO.setPartnershipSignatorySecondIdNumber(String.valueOf(data.get("签约人2身份证号码")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("合同开始日期"))){
|
||||||
|
importOaOldShopDataDTO.setContractStartDate(String.valueOf(data.get("合同开始日期")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("合同结束日期"))){
|
||||||
|
importOaOldShopDataDTO.setContractEndDate(String.valueOf(data.get("合同结束日期")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("合同编号"))){
|
||||||
|
importOaOldShopDataDTO.setContractCode(String.valueOf(data.get("合同编号")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("保护距离(米)"))){
|
||||||
|
importOaOldShopDataDTO.setProtectionDistance(String.valueOf(data.get("保护距离(米)")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("介绍人"))){
|
||||||
|
importOaOldShopDataDTO.setIntroducer(String.valueOf(data.get("介绍人")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("介绍门店"))){
|
||||||
|
importOaOldShopDataDTO.setIntroduceStore(String.valueOf(data.get("介绍门店")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("介绍奖"))){
|
||||||
|
importOaOldShopDataDTO.setIntroductionAward(String.valueOf(data.get("介绍奖")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("报货物流仓库"))){
|
||||||
|
importOaOldShopDataDTO.setDeclareGoodsLogisticsWarehouseName(String.valueOf(data.get("报货物流仓库")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("收款公司民生银行账号"))){
|
||||||
|
importOaOldShopDataDTO.setReceivingMsBankAccount(String.valueOf(data.get("收款公司民生银行账号")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("云流水账号"))){
|
||||||
|
importOaOldShopDataDTO.setYlsAccount(String.valueOf(data.get("云流水账号")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("加盟费"))){
|
||||||
|
importOaOldShopDataDTO.setYearFranchiseFee(String.valueOf(data.get("加盟费")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("加盟费优惠原因"))){
|
||||||
|
importOaOldShopDataDTO.setDiscountReason(String.valueOf(data.get("加盟费优惠原因")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("管理费"))){
|
||||||
|
importOaOldShopDataDTO.setFirstYearManageFee(String.valueOf(data.get("管理费")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("设计费"))){
|
||||||
|
importOaOldShopDataDTO.setPerformanceBond(String.valueOf(data.get("设计费")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("保证金"))){
|
||||||
|
importOaOldShopDataDTO.setLoanMargin(String.valueOf(data.get("保证金")));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(data.get("品牌使用管理费"))){
|
||||||
|
importOaOldShopDataDTO.setFirstYearFee(String.valueOf(data.get("品牌使用管理费")));
|
||||||
|
}
|
||||||
|
return importOaOldShopDataDTO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,6 +40,7 @@ import org.springframework.scheduling.annotation.Async;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@@ -317,10 +318,10 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
||||||
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
||||||
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
||||||
String total = (new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
|
String total = (new BigDecimal(franchiseFeeDTO.getPerformanceBond()).add(new BigDecimal(franchiseFeeDTO.getFirstYearFee()))
|
||||||
.add(new BigInteger(franchiseFeeDTO.getFirstYearManagementFee()))
|
.add(new BigDecimal(franchiseFeeDTO.getFirstYearManagementFee()))
|
||||||
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee()))
|
.add(new BigDecimal(franchiseFeeDTO.getYearFranchiseFee()))
|
||||||
.add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
|
.add(new BigDecimal(franchiseFeeDTO.getLoanMargin())).toString());
|
||||||
dto.setTotalAmountContributions(total);
|
dto.setTotalAmountContributions(total);
|
||||||
dto.setFranchiseFee(franchiseFeeDTO.getYearFranchiseFee());
|
dto.setFranchiseFee(franchiseFeeDTO.getYearFranchiseFee());
|
||||||
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
||||||
@@ -460,10 +461,10 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
||||||
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
||||||
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
||||||
String total = (new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
|
String total = (new BigDecimal(franchiseFeeDTO.getPerformanceBond()).add(new BigDecimal(franchiseFeeDTO.getFirstYearFee()))
|
||||||
.add(new BigInteger(franchiseFeeDTO.getFirstYearManagementFee()))
|
.add(new BigDecimal(franchiseFeeDTO.getFirstYearManagementFee()))
|
||||||
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee()))
|
.add(new BigDecimal(franchiseFeeDTO.getYearFranchiseFee()))
|
||||||
.add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
|
.add(new BigDecimal(franchiseFeeDTO.getLoanMargin())).toString());
|
||||||
dto.setTotalAmountContributions(total);
|
dto.setTotalAmountContributions(total);
|
||||||
dto.setFranchiseFee(franchiseFeeDTO.getYearFranchiseFee());
|
dto.setFranchiseFee(franchiseFeeDTO.getYearFranchiseFee());
|
||||||
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -109,8 +110,8 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(linePayDO.getLineId());
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(linePayDO.getLineId());
|
||||||
linePayResult.setPartnerName(lineInfoDO.getUsername());
|
linePayResult.setPartnerName(lineInfoDO.getUsername());
|
||||||
}
|
}
|
||||||
linePayResult.setAmount(new BigInteger(result.getPerformanceBond()).add(new BigInteger(result.getFirstYearFee())).add(new BigInteger(result.getFirstYearManageFee()))
|
linePayResult.setAmount(new BigDecimal(result.getPerformanceBond()).add(new BigDecimal(result.getFirstYearFee())).add(new BigDecimal(result.getFirstYearManageFee()))
|
||||||
.add(new BigInteger(result.getYearFranchiseFee())).add(new BigInteger(result.getLoanMargin())).toString());
|
.add(new BigDecimal(result.getYearFranchiseFee())).add(new BigDecimal(result.getLoanMargin())).toString());
|
||||||
if (Objects.nonNull(result.getAuditId())) {
|
if (Objects.nonNull(result.getAuditId())) {
|
||||||
ShopAuditInfoDO shopAuditInfoDO = shopAuditInfoMapper.selectByPrimaryKey(result.getAuditId());
|
ShopAuditInfoDO shopAuditInfoDO = shopAuditInfoMapper.selectByPrimaryKey(result.getAuditId());
|
||||||
linePayResult.setStatus(shopAuditInfoDO.getResultType());
|
linePayResult.setStatus(shopAuditInfoDO.getResultType());
|
||||||
|
|||||||
@@ -361,5 +361,15 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean handleOldDataAccount() {
|
||||||
|
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectPasswordIsNull();
|
||||||
|
if (CollectionUtils.isEmpty(hyPartnerUserInfoDOS)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
List<String> partnerIds = hyPartnerUserInfoDOS.stream().map(HyPartnerUserInfoDO::getPartnerId).collect(Collectors.toList());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -522,9 +522,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
|
|
||||||
if (Objects.nonNull(franchiseFeeDO)) {
|
if (Objects.nonNull(franchiseFeeDO)) {
|
||||||
addSignFranchiseResponse.setYearFranchiseFee(franchiseFeeDO.getYearFranchiseFee());
|
addSignFranchiseResponse.setYearFranchiseFee(franchiseFeeDO.getYearFranchiseFee());
|
||||||
addSignFranchiseResponse.setBigYearFranchiseFee(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getYearFranchiseFee())));
|
addSignFranchiseResponse.setBigYearFranchiseFee(Convert.digitToChinese( new BigDecimal(franchiseFeeDO.getYearFranchiseFee())));
|
||||||
addSignFranchiseResponse.setLoanMargin(franchiseFeeDO.getLoanMargin());
|
addSignFranchiseResponse.setLoanMargin(franchiseFeeDO.getLoanMargin());
|
||||||
addSignFranchiseResponse.setBigLoanMargin(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getLoanMargin())));
|
addSignFranchiseResponse.setBigLoanMargin(Convert.digitToChinese( new BigDecimal(franchiseFeeDO.getLoanMargin())));
|
||||||
addSignFranchiseResponse.setFirstYearStartTime(franchiseFeeDO.getFirstYearStartTime());
|
addSignFranchiseResponse.setFirstYearStartTime(franchiseFeeDO.getFirstYearStartTime());
|
||||||
addSignFranchiseResponse.setFirstYearEndTime(franchiseFeeDO.getFirstYearEndTime());
|
addSignFranchiseResponse.setFirstYearEndTime(franchiseFeeDO.getFirstYearEndTime());
|
||||||
addSignFranchiseResponse.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
addSignFranchiseResponse.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
||||||
@@ -536,7 +536,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setThirdYearEndTime(franchiseFeeDO.getThirdYearEndTime());
|
addSignFranchiseResponse.setThirdYearEndTime(franchiseFeeDO.getThirdYearEndTime());
|
||||||
addSignFranchiseResponse.setThirdYearFee(franchiseFeeDO.getThirdYearFee());
|
addSignFranchiseResponse.setThirdYearFee(franchiseFeeDO.getThirdYearFee());
|
||||||
addSignFranchiseResponse.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
addSignFranchiseResponse.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
||||||
addSignFranchiseResponse.setBigPerformanceBond(Convert.digitToChinese(Integer.valueOf(franchiseFeeDO.getPerformanceBond())));
|
addSignFranchiseResponse.setBigPerformanceBond(Convert.digitToChinese( new BigDecimal(franchiseFeeDO.getPerformanceBond())));
|
||||||
}
|
}
|
||||||
return addSignFranchiseResponse;
|
return addSignFranchiseResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import cn.hutool.poi.excel.ExcelReader;
|
||||||
|
import cn.hutool.poi.excel.ExcelUtil;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.entity.ImportTaskDO;
|
||||||
|
import com.cool.store.enums.FileTypeEnum;
|
||||||
|
import com.cool.store.enums.ImportTaskStatusEnum;
|
||||||
|
import com.cool.store.mapper.ImportTaskMapper;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.DataHandlerServer;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/05/12/14:40
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@RequestMapping("/pc/dataHandler")
|
||||||
|
@RestController
|
||||||
|
@Api("数据处理")
|
||||||
|
@Slf4j
|
||||||
|
public class DataHandlerController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DataHandlerServer dataHandlerServer;
|
||||||
|
@Resource
|
||||||
|
private ImportTaskMapper importTaskMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||||
|
private String eid;
|
||||||
|
@PostMapping("/importOaOldShopData")
|
||||||
|
@ApiOperation("导入OA旧数据")
|
||||||
|
public ResponseResult<Boolean> importOaOldShopData(MultipartFile file) {
|
||||||
|
ExcelReader reader = null;
|
||||||
|
try {
|
||||||
|
reader = ExcelUtil.getReader(file.getInputStream());
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("read file error:", e);
|
||||||
|
}
|
||||||
|
assert reader != null;
|
||||||
|
log.info("----------------------:{}",file.getOriginalFilename());
|
||||||
|
List<Map<String, Object>> dataMapList = reader.read(0, 1, Integer.MAX_VALUE);
|
||||||
|
ImportTaskDO importTaskDO = new ImportTaskDO();
|
||||||
|
importTaskDO.setFileName(file.getOriginalFilename());
|
||||||
|
importTaskDO.setFileType(FileTypeEnum.IMPORT_OA_OLD_SHOP_DATA.getFileType());
|
||||||
|
importTaskDO.setIsImport(true);
|
||||||
|
importTaskDO.setStatus(ImportTaskStatusEnum.PROGRESS.getCode());
|
||||||
|
importTaskDO.setCreateUserId(CurrentUserHolder.getUserId());
|
||||||
|
importTaskDO.setCreateName(CurrentUserHolder.getUser().getName());
|
||||||
|
importTaskDO.setCreateTime(System.currentTimeMillis());
|
||||||
|
importTaskMapper.insert(eid ,importTaskDO);
|
||||||
|
dataHandlerServer.importOaOldShopData(dataMapList, file.getOriginalFilename(), CurrentUserHolder.getUser(), importTaskDO);
|
||||||
|
return ResponseResult.success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user