Merge branch 'cc_20250513' into cc_2250513_api
This commit is contained in:
@@ -277,4 +277,6 @@ public class RedisConstant {
|
|||||||
* 招商经理轮询key
|
* 招商经理轮询key
|
||||||
*/
|
*/
|
||||||
public static final String YUN_XUE_TANG_ACCESS_TOKEN = "yun_xue_tang_access_token_";
|
public static final String YUN_XUE_TANG_ACCESS_TOKEN = "yun_xue_tang_access_token_";
|
||||||
|
|
||||||
|
public static final String SUBMIT_BUILD_KEY = "submit_build_key_";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,5 +106,8 @@ public class RedisConstantUtil {
|
|||||||
public String getInvestmentManagerKey(Long wantShopAreaId, Long roleId) {
|
public String getInvestmentManagerKey(Long wantShopAreaId, Long roleId) {
|
||||||
return active + "_" + RedisConstant.INVESTMENT_MANAGER_CACHE + eid + ":" + wantShopAreaId + ":" + roleId ;
|
return active + "_" + RedisConstant.INVESTMENT_MANAGER_CACHE + eid + ":" + wantShopAreaId + ":" + roleId ;
|
||||||
}
|
}
|
||||||
|
public String submitBuildKey(Long shopId){
|
||||||
|
return active + "_" + RedisConstant.SUBMIT_BUILD_KEY + eid + ":" + shopId ;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
c.line_id as lineId,
|
c.line_id as lineId,
|
||||||
c.region_id as regionId,
|
c.region_id as regionId,
|
||||||
c.store_type as storeType,
|
c.store_type as storeType,
|
||||||
|
c.join_mode as joinMode,
|
||||||
b.shop_stage as stage,
|
b.shop_stage as stage,
|
||||||
b.shop_sub_stage as subStage,
|
b.shop_sub_stage as subStage,
|
||||||
b.shop_sub_stage_status as subStageStatus,
|
b.shop_sub_stage_status as subStageStatus,
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
c.id as shopId,
|
c.id as shopId,
|
||||||
c.line_id as lineId,
|
c.line_id as lineId,
|
||||||
c.region_id as regionId,
|
c.region_id as regionId,
|
||||||
|
c.join_mode as joinMode,
|
||||||
c.store_type as storeType,
|
c.store_type as storeType,
|
||||||
b.shop_stage as stage,
|
b.shop_stage as stage,
|
||||||
b.shop_sub_stage as subStage,
|
b.shop_sub_stage as subStage,
|
||||||
@@ -62,6 +63,7 @@
|
|||||||
c.line_id as lineId,
|
c.line_id as lineId,
|
||||||
c.region_id as regionId,
|
c.region_id as regionId,
|
||||||
c.store_type as storeType,
|
c.store_type as storeType,
|
||||||
|
c.join_mode as joinMode,
|
||||||
b.shop_stage as stage,
|
b.shop_stage as stage,
|
||||||
b.shop_sub_stage as subStage,
|
b.shop_sub_stage as subStage,
|
||||||
b.shop_sub_stage_status as subStageStatus,
|
b.shop_sub_stage_status as subStageStatus,
|
||||||
@@ -85,6 +87,7 @@
|
|||||||
c.line_id as lineId,
|
c.line_id as lineId,
|
||||||
c.region_id as regionId,
|
c.region_id as regionId,
|
||||||
c.store_type as storeType,
|
c.store_type as storeType,
|
||||||
|
c.join_mode as joinMode,
|
||||||
b.shop_stage as stage,
|
b.shop_stage as stage,
|
||||||
b.shop_sub_stage as subStage,
|
b.shop_sub_stage as subStage,
|
||||||
b.shop_sub_stage_status as subStageStatus,
|
b.shop_sub_stage_status as subStageStatus,
|
||||||
|
|||||||
@@ -56,7 +56,9 @@
|
|||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
|
<select id="selectByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
|
||||||
select contract_code,shop_id,sign_type,contract_start_time,contract_end_time,contract_amount,create_time,partnership_signatory_first,partnership_signatory_second
|
select contract_code,shop_id,sign_type,contract_start_time,contract_end_time,contract_amount,create_time,
|
||||||
|
partnership_signatory_first,partnership_signatory_second ,partnership_signatory_second_id_number,partnership_signatory_second_mobile,
|
||||||
|
introduction_award,introduce_store,introducer,protective_distance,partnership_signatory_first_which_store
|
||||||
from xfsg_sign_franchise
|
from xfsg_sign_franchise
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="list !=null and list.size >0">
|
<if test="list !=null and list.size >0">
|
||||||
|
|||||||
@@ -76,95 +76,107 @@ public class ExportJoinShopDTO {
|
|||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String contractCode;
|
private String contractCode;
|
||||||
|
|
||||||
@ExcelProperty(value = "第一年加盟开始日期", order = 17)
|
@ExcelProperty(value = "合同签约时间", order = 17)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String firstYearStartTime;
|
private String contractSignTime;
|
||||||
|
|
||||||
@ExcelProperty(value = "第一年管理费到期日期", order = 18)
|
@ExcelProperty(value = "合同开始时间", order = 18)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String firstYearEndTime;
|
private String contractStartTime;
|
||||||
|
|
||||||
@ExcelProperty(value = "加盟费(含税)", order = 19)
|
@ExcelProperty(value = "合同结束时间", order = 19)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String contractEndTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "第几家分店", order = 20)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private Integer partnershipSignatoryFirstWhichStore;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "保护距离(米)", order = 21)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private Integer protectiveDistance;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "加盟费(含税)", order = 22)
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String franchiseFee;
|
private String franchiseFee;
|
||||||
|
|
||||||
@ExcelProperty(value = "第一年度管理费(含税)", order = 20)
|
@ExcelProperty(value = "第一年度管理费(含税)", order = 23)
|
||||||
@ColumnWidth(40)
|
@ColumnWidth(40)
|
||||||
private String firstYearManagementFee;
|
private String firstYearManagementFee;
|
||||||
|
|
||||||
@ExcelProperty(value = "设计费(含税)", order = 21)
|
@ExcelProperty(value = "设计费(含税)", order = 24)
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String performanceBond;
|
private String performanceBond;
|
||||||
|
|
||||||
@ExcelProperty(value = "保证金(含税)", order = 22)
|
@ExcelProperty(value = "保证金(含税)", order = 25)
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String loanMargin;
|
private String loanMargin;
|
||||||
|
|
||||||
@ExcelProperty(value = "第一年度品牌使用费(含税)", order = 23)
|
@ExcelProperty(value = "第一年度品牌使用费(含税)", order = 26)
|
||||||
@ColumnWidth(40)
|
@ColumnWidth(40)
|
||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
|
|
||||||
@ExcelProperty(value = "合计缴费金额(含税)", order = 24)
|
@ExcelProperty(value = "合计缴费金额(含税)", order = 27)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String totalAmountContributions;
|
private String totalAmountContributions;
|
||||||
|
|
||||||
@ExcelProperty(value = "加盟费优惠原因", order = 25)
|
@ExcelProperty(value = "加盟费优惠原因", order = 28)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String discountReason;
|
private String discountReason;
|
||||||
|
|
||||||
@ExcelProperty(value = "店面租金", order = 26)
|
@ExcelProperty(value = "店面租金", order = 29)
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String monthRent;
|
private String monthRent;
|
||||||
|
|
||||||
@ExcelProperty(value = "省", order = 27)
|
@ExcelProperty(value = "省", order = 30)
|
||||||
@ColumnWidth(15)
|
@ColumnWidth(15)
|
||||||
private String province;
|
private String province;
|
||||||
|
|
||||||
@ExcelProperty(value = "市", order = 28)
|
@ExcelProperty(value = "市", order = 31)
|
||||||
@ColumnWidth(15)
|
@ColumnWidth(15)
|
||||||
private String city;
|
private String city;
|
||||||
|
|
||||||
@ExcelProperty(value = "区", order = 29)
|
@ExcelProperty(value = "区", order = 32)
|
||||||
@ColumnWidth(15)
|
@ColumnWidth(15)
|
||||||
private String district;
|
private String district;
|
||||||
|
|
||||||
@ExcelProperty(value = "场地实际面积", order = 30)
|
@ExcelProperty(value = "场地实际面积", order = 33)
|
||||||
@ColumnWidth(15)
|
@ColumnWidth(15)
|
||||||
private String area;
|
private String area;
|
||||||
|
|
||||||
@ExcelProperty(value = "报货物流仓库", order = 31)
|
@ExcelProperty(value = "报货物流仓库", order = 34)
|
||||||
@ColumnWidth(25)
|
@ColumnWidth(25)
|
||||||
private String declareGoodsLogisticsWarehouseName;
|
private String declareGoodsLogisticsWarehouseName;
|
||||||
|
|
||||||
@ExcelProperty(value = "报货类型", order = 32)
|
@ExcelProperty(value = "报货类型", order = 35)
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String declareGoodsType;
|
private String declareGoodsType;
|
||||||
|
|
||||||
@ExcelProperty(value = "云流水报货时间", order = 33)
|
@ExcelProperty(value = "云流水报货时间", order = 36)
|
||||||
@ColumnWidth(35)
|
@ColumnWidth(35)
|
||||||
private String ylsDeclareGoodsTime;
|
private String ylsDeclareGoodsTime;
|
||||||
|
|
||||||
@ExcelProperty(value = "仓库配送时间", order = 34)
|
@ExcelProperty(value = "仓库配送时间", order = 37)
|
||||||
@ColumnWidth(35)
|
@ColumnWidth(35)
|
||||||
private String warehouseDeliveryTime;
|
private String warehouseDeliveryTime;
|
||||||
|
|
||||||
@ExcelProperty(value = "收款公司", order = 35)
|
@ExcelProperty(value = "收款公司", order = 38)
|
||||||
@ColumnWidth(35)
|
@ColumnWidth(35)
|
||||||
private String receivingFirmName;
|
private String receivingFirmName;
|
||||||
|
|
||||||
@ExcelProperty(value = "收款公司民生银行账号", order = 36)
|
@ExcelProperty(value = "收款公司民生银行账号", order = 39)
|
||||||
@ColumnWidth(35)
|
@ColumnWidth(35)
|
||||||
private String receivingMsBankAccount;
|
private String receivingMsBankAccount;
|
||||||
|
|
||||||
@ExcelProperty(value = "店铺地址", order = 37)
|
@ExcelProperty(value = "店铺地址", order = 40)
|
||||||
@ColumnWidth(40)
|
@ColumnWidth(40)
|
||||||
private String shopAddress;
|
private String shopAddress;
|
||||||
|
|
||||||
@ExcelProperty(value = "阶段状态-建店资料收集", order = 38)
|
@ExcelProperty(value = "阶段状态-建店资料收集", order = 41)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String buildInformationStatus;
|
private String buildInformationStatus;
|
||||||
|
|
||||||
@ExcelProperty(value = "建店资料完成时间", order = 39)
|
@ExcelProperty(value = "建店资料完成时间", order = 42)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String buildInformationEndTime;
|
private String buildInformationEndTime;
|
||||||
}
|
}
|
||||||
@@ -42,6 +42,8 @@ public class BaseInfoVO {
|
|||||||
|
|
||||||
@ApiModelProperty("子阶段状态")
|
@ApiModelProperty("子阶段状态")
|
||||||
private Integer workflowSubStageStatus;
|
private Integer workflowSubStageStatus;
|
||||||
|
@ApiModelProperty("加盟模式")
|
||||||
|
private Integer joinMode;
|
||||||
|
|
||||||
public BaseInfoVO(){}
|
public BaseInfoVO(){}
|
||||||
/**
|
/**
|
||||||
@@ -59,6 +61,7 @@ public class BaseInfoVO {
|
|||||||
this.userPortraitList = baseInfoVO.getUserPortraitList();
|
this.userPortraitList = baseInfoVO.getUserPortraitList();
|
||||||
this.workflowStage = baseInfoVO.getWorkflowStage();
|
this.workflowStage = baseInfoVO.getWorkflowStage();
|
||||||
this.workflowSubStageStatus = baseInfoVO.getWorkflowSubStageStatus();
|
this.workflowSubStageStatus = baseInfoVO.getWorkflowSubStageStatus();
|
||||||
|
this.joinMode = baseInfoVO.getJoinMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public class PreparationCommonPendingVO {
|
|||||||
private String submitTime;
|
private String submitTime;
|
||||||
@ApiModelProperty("门店类型")
|
@ApiModelProperty("门店类型")
|
||||||
private Integer storeType;
|
private Integer storeType;
|
||||||
|
@ApiModelProperty("加盟模式")
|
||||||
|
private Integer joinMode;
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import com.cool.store.service.BuildInformationService;
|
|||||||
import com.cool.store.mapper.BuildInformationMapper;
|
import com.cool.store.mapper.BuildInformationMapper;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
import com.cool.store.service.UserAuthMappingService;
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
|
import com.cool.store.utils.RedisConstantUtil;
|
||||||
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import io.lettuce.core.ZAddArgs;
|
import io.lettuce.core.ZAddArgs;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -37,6 +39,10 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class BuildInformationServiceImpl implements BuildInformationService {
|
public class BuildInformationServiceImpl implements BuildInformationService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RedisConstantUtil redisConstantUtil;
|
||||||
|
@Resource
|
||||||
|
private RedisUtilPool redisUtilPool;
|
||||||
@Resource
|
@Resource
|
||||||
private WarehouseInfoMapper warehouseInfoMapper;
|
private WarehouseInfoMapper warehouseInfoMapper;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -176,51 +182,66 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Integer submitOrUpdate(BuildInformationRequest request) {
|
public Integer submitOrUpdate(BuildInformationRequest request) {
|
||||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
String lockKey = redisConstantUtil.submitBuildKey(request.getShopId());
|
||||||
BuildInformationDO buildInformationDO = request.toDO();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
OrderSysInfoDO orderSysInfoDO = getOrderSysInfoDO(request);
|
boolean acquired = false;
|
||||||
OrderSysInfoDO orderSysInfoDO1 = orderSysInfoDAO.selectByShopId(request.getShopId());
|
try {
|
||||||
if (Objects.nonNull(orderSysInfoDO1)) {
|
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||||
orderSysInfoDAO.updateByShopId(orderSysInfoDO);
|
if (Boolean.TRUE.equals(acquired)) {
|
||||||
} else {
|
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
||||||
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
BuildInformationDO buildInformationDO = request.toDO();
|
||||||
}
|
OrderSysInfoDO orderSysInfoDO = getOrderSysInfoDO(request);
|
||||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
OrderSysInfoDO orderSysInfoDO1 = orderSysInfoDAO.selectByShopId(request.getShopId());
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
if (Objects.nonNull(orderSysInfoDO1)) {
|
||||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
|
orderSysInfoDAO.updateByShopId(orderSysInfoDO);
|
||||||
if (request.getJuridicalIsSamePartner()) {
|
} else {
|
||||||
buildInformationDO.setJuridicalIdCardNo(qualificationsInfoDO.getIdCardNo());
|
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
||||||
buildInformationDO.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
}
|
||||||
buildInformationDO.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
}
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||||
if (request.getSettlerIsSamePartner()) {
|
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
|
||||||
buildInformationDO.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
|
if (request.getJuridicalIsSamePartner()) {
|
||||||
buildInformationDO.setSettlerName(lineInfoDO.getUsername());
|
buildInformationDO.setJuridicalIdCardNo(qualificationsInfoDO.getIdCardNo());
|
||||||
buildInformationDO.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
buildInformationDO.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||||
buildInformationDO.setSettlerIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
buildInformationDO.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
||||||
}
|
}
|
||||||
if (Objects.isNull(informationDO)) {
|
if (request.getSettlerIsSamePartner()) {
|
||||||
buildInformationDO.setCreateTime(new Date());
|
buildInformationDO.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
buildInformationDO.setSettlerName(lineInfoDO.getUsername());
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151);
|
buildInformationDO.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||||
HashMap<String, String> map = new HashMap<>();
|
buildInformationDO.setSettlerIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
||||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
}
|
||||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
if (Objects.isNull(informationDO)) {
|
||||||
map.put("storeName", shopInfoDO.getShopName());
|
buildInformationDO.setCreateTime(new Date());
|
||||||
List<EnterpriseUserDO> logisticsList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.LOGISTICS, shopInfoDO.getRegionId());
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
List<String> logistics = new ArrayList<>();
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151);
|
||||||
if (Objects.nonNull(logisticsList)) {
|
HashMap<String, String> map = new HashMap<>();
|
||||||
logistics.addAll(logisticsList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||||
|
map.put("storeName", shopInfoDO.getShopName());
|
||||||
|
List<EnterpriseUserDO> logisticsList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.LOGISTICS, shopInfoDO.getRegionId());
|
||||||
|
List<String> logistics = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(logisticsList)) {
|
||||||
|
logistics.addAll(logisticsList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(logistics,
|
||||||
|
MessageEnum.MESSAGE_52,
|
||||||
|
map);
|
||||||
|
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||||
|
} else {
|
||||||
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
|
return buildInformationDAO.updateByShopIdSelective(buildInformationDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (Boolean.TRUE.equals(acquired)) {
|
||||||
|
String currentValue = redisUtilPool.getString(lockKey);
|
||||||
|
if (lockValue.equals(currentValue)) {
|
||||||
|
redisUtilPool.delKey(lockKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
commonService.sendQWMessage(logistics,
|
|
||||||
MessageEnum.MESSAGE_52,
|
|
||||||
map);
|
|
||||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
|
||||||
} else {
|
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
|
||||||
return buildInformationDAO.updateByShopIdSelective(buildInformationDO);
|
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @NotNull OrderSysInfoDO getOrderSysInfoDO(BuildInformationRequest request) {
|
private static @NotNull OrderSysInfoDO getOrderSysInfoDO(BuildInformationRequest request) {
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
payStagePendingVO.setPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, linePayDO.getPayTime()));
|
payStagePendingVO.setPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, linePayDO.getPayTime()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
list.add(payStagePendingVO);
|
list.add(payStagePendingVO);
|
||||||
});
|
});
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
@@ -192,6 +193,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
baseInfoVO.setUserPortraitList(labelBaseInfoList);
|
baseInfoVO.setUserPortraitList(labelBaseInfoList);
|
||||||
|
baseInfoVO.setJoinMode(lineInfoDO.getJoinMode());
|
||||||
baseInfoVO.setWantShopAreaName(wantShopAreaMap.get(lineInfoDO.getWantShopAreaId()));
|
baseInfoVO.setWantShopAreaName(wantShopAreaMap.get(lineInfoDO.getWantShopAreaId()));
|
||||||
return baseInfoVO;
|
return baseInfoVO;
|
||||||
}
|
}
|
||||||
@@ -442,7 +444,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
//只有设计组长 查询 指定当前用户和阶段为 900 待分配设计师
|
//只有设计组长 查询 指定当前用户和阶段为 900 待分配设计师
|
||||||
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode()) && !userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode()) && !userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode())) {
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
return decorationMeasureDAO.getShopIdListByDesignUserIdAndShopStage(user.getUserId());
|
return decorationMeasureDAO.getShopIdListByDesignUserIdAndShopStage(user.getUserId());
|
||||||
}
|
}
|
||||||
//只有设计师 查询 指定当前用户和阶段为 901 设计中
|
//只有设计师 查询 指定当前用户和阶段为 901 设计中
|
||||||
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && !userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && !userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
||||||
@@ -450,7 +452,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
return decorationDesignInfoDAO.getByDesignUserIdAndShopStage(user.getUserId());
|
return decorationDesignInfoDAO.getByDesignUserIdAndShopStage(user.getUserId());
|
||||||
}
|
}
|
||||||
//有 设计组长 和 设计师 查询 指定当前用户和 阶段为 900 待分配设计师 阶段为 901 设计中
|
//有 设计组长 和 设计师 查询 指定当前用户和 阶段为 900 待分配设计师 阶段为 901 设计中
|
||||||
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
return decorationMeasureDAO.getShopIdListByDesignUserIdOrQuotationAndShopStage(user.getUserId());
|
return decorationMeasureDAO.getShopIdListByDesignUserIdOrQuotationAndShopStage(user.getUserId());
|
||||||
}
|
}
|
||||||
@@ -484,7 +486,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
}
|
}
|
||||||
} else if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())) {
|
} else if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())) {
|
||||||
vo.setSubmitTime(DateUtils.parseDateToStr( SPECIAL_DATE_START,constructionMap.get(vo.getShopId())));
|
vo.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, constructionMap.get(vo.getShopId())));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -672,13 +674,16 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
preparationCommonPendingVO.setShopId(x.getShopId());
|
preparationCommonPendingVO.setShopId(x.getShopId());
|
||||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||||
preparationCommonPendingVO.setStoreType(shopInfoDO.getStoreType());
|
preparationCommonPendingVO.setStoreType(shopInfoDO.getStoreType());
|
||||||
if (shopInfoDO != null) {
|
if (StringUtil.isNotEmpty(shopInfoDO.getDetailAddress())) {
|
||||||
|
preparationCommonPendingVO.setShopAddress(shopInfoDO.getDetailAddress());
|
||||||
|
} else {
|
||||||
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
||||||
if (pointInfoDO != null) {
|
if (pointInfoDO != null) {
|
||||||
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
||||||
}
|
}
|
||||||
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
|
||||||
}
|
}
|
||||||
|
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
||||||
|
preparationCommonPendingVO.setJoinMode(shopInfoDO.getJoinMode());
|
||||||
preparationCommonPendingVO.setInvestmentManager(lineMap.getOrDefault(x.getLineId(), new PlanLineDTO()).getInvestmentManagerName());
|
preparationCommonPendingVO.setInvestmentManager(lineMap.getOrDefault(x.getLineId(), new PlanLineDTO()).getInvestmentManagerName());
|
||||||
preparationCommonPendingVO.setStage(x.getShopStage());
|
preparationCommonPendingVO.setStage(x.getShopStage());
|
||||||
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
||||||
@@ -746,13 +751,10 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
operationLogDOList.forEach(x -> {
|
operationLogDOList.forEach(x -> {
|
||||||
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
|
||||||
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
|
||||||
if (shopInfoDO != null) {
|
preparationCommonPendingVO.setStoreType(shopInfoDO.getStoreType());
|
||||||
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
|
preparationCommonPendingVO.setJoinMode(shopInfoDO.getJoinMode());
|
||||||
if (pointInfoDO != null) {
|
preparationCommonPendingVO.setShopAddress(shopInfoDO.getDetailAddress());
|
||||||
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
|
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
||||||
}
|
|
||||||
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
|
|
||||||
}
|
|
||||||
preparationCommonPendingVO.setLineId(shopInfoDO.getLineId());
|
preparationCommonPendingVO.setLineId(shopInfoDO.getLineId());
|
||||||
preparationCommonPendingVO.setShopId(x.getShopId());
|
preparationCommonPendingVO.setShopId(x.getShopId());
|
||||||
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
|
||||||
|
|||||||
@@ -156,10 +156,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.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
|
dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
|
||||||
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
||||||
@@ -412,6 +412,11 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
Map<Long, ShopStageInfoDO> buildStageMap = buildStages.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
Map<Long, ShopStageInfoDO> buildStageMap = buildStages.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
||||||
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
||||||
|
Set<Long> lineIds = list.stream().map(BranchShopResponse::getLineId).collect(Collectors.toSet());
|
||||||
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.getByLineIds( new ArrayList<>(lineIds));
|
||||||
|
Map<Long, LineInfoDO> lineMap = lineInfoDOS.stream().collect(Collectors.toMap(LineInfoDO::getId, Function.identity()));
|
||||||
|
List<QualificationsInfoDO> qualificationsInfoDOList = qualificationsInfoDAO.getByLineIds(new ArrayList<>(lineIds));
|
||||||
|
Map<Long, QualificationsInfoDO> qualificationsInfoDOMap = qualificationsInfoDOList.stream().collect(Collectors.toMap(QualificationsInfoDO::getLineId, Function.identity()));
|
||||||
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
||||||
if (signFranchises != null) {
|
if (signFranchises != null) {
|
||||||
signFranchiseMap = signFranchises.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, Function.identity()));
|
signFranchiseMap = signFranchises.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, Function.identity()));
|
||||||
@@ -459,8 +464,6 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId());
|
FranchiseFeeDTO franchiseFeeDTO = franchiseFeeDTOMap.get(response.getShopId());
|
||||||
dto.setStoreType(StoreTypeEnum.getMessage(response.getStoreType()));
|
dto.setStoreType(StoreTypeEnum.getMessage(response.getStoreType()));
|
||||||
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
if (ObjectUtils.isNotEmpty(franchiseFeeDTO)) {
|
||||||
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
|
|
||||||
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
|
|
||||||
String total = (new BigDecimal(franchiseFeeDTO.getPerformanceBond()).add(new BigDecimal(franchiseFeeDTO.getFirstYearFee()))
|
String total = (new BigDecimal(franchiseFeeDTO.getPerformanceBond()).add(new BigDecimal(franchiseFeeDTO.getFirstYearFee()))
|
||||||
.add(new BigDecimal(franchiseFeeDTO.getFirstYearManagementFee()))
|
.add(new BigDecimal(franchiseFeeDTO.getFirstYearManagementFee()))
|
||||||
.add(new BigDecimal(franchiseFeeDTO.getYearFranchiseFee()))
|
.add(new BigDecimal(franchiseFeeDTO.getYearFranchiseFee()))
|
||||||
@@ -481,9 +484,15 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(response.getShopId());
|
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(response.getShopId());
|
||||||
if (signFranchiseDO != null) {
|
if (signFranchiseDO != null) {
|
||||||
dto.setContractCode(signFranchiseDO.getContractCode());
|
dto.setContractCode(signFranchiseDO.getContractCode());
|
||||||
dto.setPartnershipSignatoryFirst(signFranchiseDO.getPartnershipSignatoryFirst());
|
|
||||||
dto.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
|
dto.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
|
||||||
|
dto.setPartnershipSignatorySecondMobile(signFranchiseDO.getPartnershipSignatorySecondMobile());
|
||||||
|
dto.setPartnershipSignatorySecondIdCard(signFranchiseDO.getPartnershipSignatorySecondIdNumber());
|
||||||
dto.setSignType(SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
dto.setSignType(SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
||||||
|
dto.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
|
||||||
|
dto.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
|
||||||
|
dto.setContractSignTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1, signFranchiseDO.getCreateTime()));
|
||||||
|
dto.setContractStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1, signFranchiseDO.getContractStartTime()));
|
||||||
|
dto.setContractEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1, signFranchiseDO.getContractEndTime()));
|
||||||
}
|
}
|
||||||
ShopStageInfoDO buildStageInfoDO = buildStageMap.get(response.getShopId());
|
ShopStageInfoDO buildStageInfoDO = buildStageMap.get(response.getShopId());
|
||||||
if (buildStageInfoDO != null) {
|
if (buildStageInfoDO != null) {
|
||||||
@@ -493,6 +502,11 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
dto.setBuildInformationEndTime(buildStageInfoDO.getActualCompleteTime());
|
dto.setBuildInformationEndTime(buildStageInfoDO.getActualCompleteTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LineInfoDO lineInfoDO = lineMap.getOrDefault(response.getLineId(), new LineInfoDO());
|
||||||
|
dto.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||||
|
dto.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||||
|
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDOMap.getOrDefault(response.getLineId(), new QualificationsInfoDO());
|
||||||
|
dto.setPartnershipSignatoryFirstIdCard(qualificationsInfoDO.getIdCardNo());
|
||||||
exportList.add(dto);
|
exportList.add(dto);
|
||||||
}
|
}
|
||||||
url = easyExcelUtil.exportExcel(ExportJoinShopDTO.class, exportList, null,
|
url = easyExcelUtil.exportExcel(ExportJoinShopDTO.class, exportList, null,
|
||||||
|
|||||||
Reference in New Issue
Block a user