Merge branch 'cc_20250613_fix' into 'master'

Cc 20250613 fix

See merge request hangzhou/java/custom_zxjp!115
This commit is contained in:
苏竹红
2025-06-16 10:41:24 +00:00
14 changed files with 180 additions and 35 deletions

View File

@@ -243,7 +243,8 @@ public enum ErrorCodeEnum {
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null), QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null), DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null), LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null),
UPDATE_DESIGN_LEADER(131019,"设计阶段状态不支持修改设计组",null),
UPDATE_DESIGN_USER(131022,"设计阶段状态不支持修改设计师",null),
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null), TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
THIRD_API_ERROR(151001,"第三方服务异常->{0}",null), THIRD_API_ERROR(151001,"第三方服务异常->{0}",null),

View File

@@ -88,6 +88,7 @@ public enum MessageEnum {
MESSAGE_59("您有一个门店设计阶段报价任务待领取,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_59("您有一个门店设计阶段报价任务待领取,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_60("您有一个门店已提交京东建店资料,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_60("您有一个门店已提交京东建店资料,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_61("您有一个门店京东外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_61("您有一个门店京东外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_62("您有一个门店设计阶段设计图待提交,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
; ;

View File

@@ -24,14 +24,15 @@ public class DecorationDesignInfoDAO {
@Resource @Resource
DecorationDesignInfoMapper decorationDesignInfoMapper; DecorationDesignInfoMapper decorationDesignInfoMapper;
public DecorationDesignInfoDO getById(Long id){ public DecorationDesignInfoDO getById(Long id) {
if(id == null){ if (id == null) {
return null; return null;
} }
return decorationDesignInfoMapper.selectByPrimaryKey(id); return decorationDesignInfoMapper.selectByPrimaryKey(id);
} }
public List<DecorationDesignInfoDO> getByIds(List<Long> shopIds){
if(CollectionUtils.isEmpty(shopIds)){ public List<DecorationDesignInfoDO> getByIds(List<Long> shopIds) {
if (CollectionUtils.isEmpty(shopIds)) {
return new ArrayList<>(); return new ArrayList<>();
} }
Example example = new Example(DecorationDesignInfoDO.class); Example example = new Example(DecorationDesignInfoDO.class);
@@ -39,29 +40,41 @@ public class DecorationDesignInfoDAO {
return decorationDesignInfoMapper.selectByExample(example); return decorationDesignInfoMapper.selectByExample(example);
} }
public Integer insertSelective(DecorationDesignInfoDO decorationDesignInfoDO){ public Integer insertSelective(DecorationDesignInfoDO decorationDesignInfoDO) {
return decorationDesignInfoMapper.insertSelective(decorationDesignInfoDO); return decorationDesignInfoMapper.insertSelective(decorationDesignInfoDO);
} }
public Integer updateByPrimaryKeySelective(DecorationDesignInfoDO decorationDesignInfoDO){ public Integer updateByPrimaryKeySelective(DecorationDesignInfoDO decorationDesignInfoDO) {
return decorationDesignInfoMapper.updateByPrimaryKeySelective(decorationDesignInfoDO); return decorationDesignInfoMapper.updateByPrimaryKeySelective(decorationDesignInfoDO);
} }
public DecorationDesignInfoDO getByShopId(Long shopId){ public DecorationDesignInfoDO getByShopId(Long shopId) {
if(shopId == null){ if (shopId == null) {
return null; return null;
} }
return decorationDesignInfoMapper.selectByShopId(shopId); return decorationDesignInfoMapper.selectByShopId(shopId);
} }
// 根据设计师人员id和店铺阶段 SHOP_SUB_STAGE_STATUS_901 查询店铺信息 // 根据设计师人员id和店铺阶段 SHOP_SUB_STAGE_STATUS_901 查询店铺信息
public List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(String userId, String keyword){ public List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(String userId, String keyword) {
if(userId == null){ if (userId == null) {
return new ArrayList<>(); return new ArrayList<>();
} }
return decorationDesignInfoMapper.getByDesignUserIdAndShopStage(userId, keyword); return decorationDesignInfoMapper.getByDesignUserIdAndShopStage(userId, keyword);
} }
public Integer updateDesignLeaderIdAndDesignUserIdInteger(Long shopId, String designLeaderId) {
if (shopId == null|| StringUtil.isEmpty(designLeaderId)){
return 0;
}
return decorationDesignInfoMapper.updateDesignLeaderIdAndDesignUserIdInteger(shopId, designLeaderId);
}
public Integer updateDesignUserId(Long shopId, String designUserId) {
if (shopId == null|| StringUtil.isEmpty(designUserId)){
return 0;
}
return decorationDesignInfoMapper.updateDesignUserId(shopId, designUserId);
}
} }

View File

@@ -18,5 +18,12 @@ public interface DecorationDesignInfoMapper extends Mapper<DecorationDesignInfoD
DecorationDesignInfoDO selectByShopId(Long shopId); DecorationDesignInfoDO selectByShopId(Long shopId);
List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(@Param("userId") String userId,@Param("keyword") String keyword); List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(@Param("userId") String userId,@Param("keyword") String keyword);
/**
* @Auther: wangshuo
* @Date: 2025/6/16
* @description:DesignUserId置空
*/
Integer updateDesignLeaderIdAndDesignUserIdInteger(@Param("shopId") Long shopId,@Param("designLeaderId") String designLeaderId);
Integer updateDesignUserId(@Param("shopId") Long shopId,@Param("designUserId") String designUserId);
} }

View File

@@ -27,6 +27,17 @@
<result column="design_submit_time" jdbcType="TIMESTAMP" property="designSubmitTime" /> <result column="design_submit_time" jdbcType="TIMESTAMP" property="designSubmitTime" />
<result column="quotation_submit_time" jdbcType="TIMESTAMP" property="quotationSubmitTime" /> <result column="quotation_submit_time" jdbcType="TIMESTAMP" property="quotationSubmitTime" />
</resultMap> </resultMap>
<update id="updateDesignLeaderIdAndDesignUserIdInteger">
update xfsg_decoration_design_info
set design_leader_id = #{designLeaderId},
design_user_id = null
where shop_id = #{shopId}
</update>
<update id="updateDesignUserId">
update xfsg_decoration_design_info
set design_user_id = #{designUserId}
where shop_id = #{shopId}
</update>
<select id="selectByShopId" resultMap="BaseResultMap"> <select id="selectByShopId" resultMap="BaseResultMap">
select select

View File

@@ -0,0 +1,20 @@
package com.cool.store.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: WangShuo
* @Date: 2025/06/13/15:47
* @Version 1.0
* @注释:
*/
@Data
public class PartnerBankInfoDTO {
@ApiModelProperty("加盟商结算账户")
private String bankCardNo;
@ApiModelProperty("开户行")
private String bank;
@ApiModelProperty("支行")
private String subBank;
}

View File

@@ -90,7 +90,8 @@ public class AddSignFranchiseRequest {
@ApiModelProperty("合同金额") @ApiModelProperty("合同金额")
@NotBlank(message = "合同金额不能为空") @NotBlank(message = "合同金额不能为空")
private String contractAmount; private String contractAmount;
@ApiModelProperty("合伙签约人1//废弃") @NotBlank(message = "合伙签约人1不能为空")
@ApiModelProperty("合伙签约人1")
private String partnershipSignatoryFirst; private String partnershipSignatoryFirst;
@ApiModelProperty("合伙签约人2") @ApiModelProperty("合伙签约人2")
private String partnershipSignatorySecond; private String partnershipSignatorySecond;

View File

@@ -1,5 +1,6 @@
package com.cool.store.response; package com.cool.store.response;
import com.cool.store.dto.PartnerBankInfoDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@@ -7,6 +8,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.Date; import java.util.Date;
import java.util.List;
@Data @Data
public class AddSignFranchiseResponse { public class AddSignFranchiseResponse {
@@ -86,7 +88,7 @@ public class AddSignFranchiseResponse {
private String franchiseeType; private String franchiseeType;
@ApiModelProperty("交款人") @ApiModelProperty("交款人")
private String payName; private List<String> payName;
@ApiModelProperty("营业执照名称") @ApiModelProperty("营业执照名称")
private String licenseName; private String licenseName;
@@ -107,12 +109,8 @@ public class AddSignFranchiseResponse {
@ApiModelProperty("加盟商身份证号") @ApiModelProperty("加盟商身份证号")
private String idCardNo; private String idCardNo;
@ApiModelProperty("加盟商结算账户") @ApiModelProperty("加盟商付款资料")
private String bankCardNo; private List<PartnerBankInfoDTO> partnerPayData;
@ApiModelProperty("开户行")
private String bank;
@ApiModelProperty("支行")
private String subBank;
@ApiModelProperty("身份证地址") @ApiModelProperty("身份证地址")
private String idCardAddress; private String idCardAddress;

View File

@@ -171,4 +171,8 @@ public interface DecorationService {
* @return * @return
*/ */
Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user); Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user);
Boolean updateDesignLeader(Long shopId, String userId);
Boolean updateDesignUser(Long shopId, String userId);
} }

View File

@@ -614,7 +614,7 @@ public class DecorationServiceImpl implements DecorationService {
//查询测量阶段的设计组长 //查询测量阶段的设计组长
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId); DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
DecorationDesignVO decorationDesignVO = new DecorationDesignVO(); DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
if (measureDO!=null){ if (measureDO != null) {
decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId()); decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId());
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId()); String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
decorationDesignVO.setDesignLeaderName(userName); decorationDesignVO.setDesignLeaderName(userName);
@@ -828,6 +828,63 @@ public class DecorationServiceImpl implements DecorationService {
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean updateDesignLeader(Long shopId, String userId) {
if (Objects.isNull(shopId) || StringUtils.isEmpty(userId)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
//设计阶段
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9);
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus())
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.UPDATE_DESIGN_LEADER);
}
DecorationMeasureDO measure = decorationMeasureDAO.getByShopId(shopId);
measure.setDesignUserId(userId);
decorationMeasureDAO.updateByPrimaryKeySelective(measure,userId);
DecorationDesignInfoDO design = decorationDesignInfoDAO.getByShopId(shopId);
if (Objects.nonNull(design)){
decorationDesignInfoDAO.updateDesignLeaderIdAndDesignUserIdInteger(shopId, userId);
}
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90);
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
HashMap<String, String> map = new HashMap<>(4);
map.put("partnerUsername", lineInfo.getUsername());
map.put("partnerMobile", lineInfo.getMobile());
map.put("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(userId),
MessageEnum.MESSAGE_58,
map
);
return true;
}
@Override
public Boolean updateDesignUser(Long shopId, String userId) {
if (Objects.isNull(shopId) || StringUtils.isEmpty(userId)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
//设计阶段
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9);
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.UPDATE_DESIGN_USER);
}
decorationDesignInfoDAO.updateDesignUserId(shopId, userId);
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
HashMap<String, String> map = new HashMap<>(4);
map.put("partnerUsername", lineInfo.getUsername());
map.put("partnerMobile", lineInfo.getMobile());
map.put("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(userId),
MessageEnum.MESSAGE_62,
map
);
return true;
}
private DecorationDTO getDecorationDTO(Long shopId) { private DecorationDTO getDecorationDTO(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (Objects.isNull(shopInfo)) { if (Objects.isNull(shopInfo)) {

View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants; import com.cool.store.constants.CommonConstants;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.dto.PartnerBankInfoDTO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.*; import com.cool.store.enums.*;
import com.cool.store.enums.point.ShopSubStageEnum; import com.cool.store.enums.point.ShopSubStageEnum;
@@ -453,7 +454,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
//线索id //线索id
Long lineId = shopInfoDO.getLineId(); Long lineId = shopInfoDO.getLineId();
//缴款信息 //缴款信息
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId); List<LinePayDO> linePayList = linePayMapper.getFranchiseFeePayInfoByShopId(shopId);
// //铺位信息 // //铺位信息
// PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId); // PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
//证照办理 //证照办理
@@ -524,19 +525,25 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId()); addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId());
addSignFranchiseResponse.setRegionName(regionInfo.getName()); addSignFranchiseResponse.setRegionName(regionInfo.getName());
} }
if(CollectionUtils.isNotEmpty(linePayList)){
if (Objects.nonNull(linePayDO)) { Set<String> payNameSet = new HashSet<>();
addSignFranchiseResponse.setPayName(linePayDO.getPayUserName()); List<Date> payTimeList = new ArrayList<>();
addSignFranchiseResponse.setBankCardNo(linePayDO.getPayAccount()); List<PartnerBankInfoDTO> partnerPayData = new ArrayList<>();
addSignFranchiseResponse.setBank(linePayDO.getBankName()); for (LinePayDO linePayDO : linePayList){
addSignFranchiseResponse.setSubBank(linePayDO.getBranchBankName()); payNameSet.add(linePayDO.getPayUserName());
if (Objects.nonNull(linePayDO.getPayTime())) { payTimeList.add(linePayDO.getPayTime());
addSignFranchiseResponse.setPayDate(linePayDO.getPayTime()); PartnerBankInfoDTO dto = new PartnerBankInfoDTO();
} else { dto.setBankCardNo(linePayDO.getPayAccount());
List<Date> payTimeList = JsonToDate(linePayDO.getCombinedField()); dto.setBank(linePayDO.getBankName());
Collections.sort(payTimeList); dto.setSubBank(linePayDO.getBranchBankName());
addSignFranchiseResponse.setPayDate(payTimeList.get(0)); partnerPayData.add(dto);
} }
addSignFranchiseResponse.setPayName(new ArrayList<>(payNameSet));
addSignFranchiseResponse.setPartnerPayData(partnerPayData);
Date earliestPayTime = payTimeList.stream()
.min(Comparator.naturalOrder())
.orElse(null);
addSignFranchiseResponse.setPayDate(earliestPayTime);
} }
if (Objects.nonNull(licenseTransactDO)) { if (Objects.nonNull(licenseTransactDO)) {
addSignFranchiseResponse.setLicenseName(licenseTransactDO.getBusinessLicense()); addSignFranchiseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());

View File

@@ -276,7 +276,7 @@ public class SyncDataServiceImpl implements SyncDataService {
} }
public String getXgjShopName(LineInfoDO lineInfoDO, ShopInfoDO shopInfoDO,SignFranchiseDO signFranchiseDO) { public String getXgjShopName(LineInfoDO lineInfoDO, ShopInfoDO shopInfoDO,SignFranchiseDO signFranchiseDO) {
if (StringUtils.isBlank(shopInfoDO.getShopCode())) { if (StringUtils.isBlank(shopInfoDO.getShopCode())||signFranchiseDO==null) {
return null; return null;
} }
String shopCode = shopInfoDO.getShopCode().trim(); String shopCode = shopInfoDO.getShopCode().trim();
@@ -310,6 +310,10 @@ public class SyncDataServiceImpl implements SyncDataService {
? "S" + shopInfoDO.getShopName() + "(" + signFranchiseDO.getPartnershipSignatoryFirst() + ")" ? "S" + shopInfoDO.getShopName() + "(" + signFranchiseDO.getPartnershipSignatoryFirst() + ")"
: "S" + shopInfoDO.getShopName() + "(" + signFranchiseDO.getPartnershipSignatoryFirst() + "/"+signFranchiseDO.getPartnershipSignatorySecond()+")"; : "S" + shopInfoDO.getShopName() + "(" + signFranchiseDO.getPartnershipSignatoryFirst() + "/"+signFranchiseDO.getPartnershipSignatorySecond()+")";
} }
// ZX0001
if (shopCode.matches("ZX\\d*")) {
return "ZX" + shopInfoDO.getShopName();
}
} }
if (String.valueOf(FranchiseBrandEnum.MZG.getCode()).equals(shopInfoDO.getFranchiseBrand())) { if (String.valueOf(FranchiseBrandEnum.MZG.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
if (shopCode.matches("MZGM\\d*")) { if (shopCode.matches("MZGM\\d*")) {

View File

@@ -193,4 +193,18 @@ public class PCDecorationController {
LoginUserInfo user = CurrentUserHolder.getUser(); LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(decorationService.saveDecorationDesign(request, user)); return ResponseResult.success(decorationService.saveDecorationDesign(request, user));
} }
@ApiOperation("修改设计组")
@GetMapping("/updateDesignLeader")
public ResponseResult<Boolean> updateDesignLeader(@RequestParam Long shopId, @RequestParam String leaderId) {
return ResponseResult.success(decorationService.updateDesignLeader(shopId, leaderId));
}
@ApiOperation("修改设计师")
@GetMapping("/updateDesignUser")
public ResponseResult<Boolean> updateDesignUser(@RequestParam Long shopId, @RequestParam String designerId) {
return ResponseResult.success(decorationService.updateDesignUser(shopId, designerId));
}
} }

View File

@@ -2,6 +2,7 @@ package com.cool.store.controller.webc;
import com.cool.store.context.PartnerUserHolder; import com.cool.store.context.PartnerUserHolder;
import com.cool.store.request.*; import com.cool.store.request.*;
import com.cool.store.response.BranchShopDetailResponse;
import com.cool.store.response.MiniShopsResponse; import com.cool.store.response.MiniShopsResponse;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.response.ShopResponse; import com.cool.store.response.ShopResponse;
@@ -144,4 +145,10 @@ public class MiniShopController {
return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage)); return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage));
} }
@ApiOperation("开店详情/左边小窗")
@GetMapping("/getBranchShopDetail")
public ResponseResult<BranchShopDetailResponse> getBranchShopDetail(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(shopService.getBranchShopDetail(shopId));
}
} }