Merge branch 'cc_20250613_fix' into 'master'
Cc 20250613 fix See merge request hangzhou/java/custom_zxjp!115
This commit is contained in:
@@ -243,7 +243,8 @@ public enum ErrorCodeEnum {
|
||||
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
|
||||
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
|
||||
LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null),
|
||||
|
||||
UPDATE_DESIGN_LEADER(131019,"设计阶段状态不支持修改设计组",null),
|
||||
UPDATE_DESIGN_USER(131022,"设计阶段状态不支持修改设计师",null),
|
||||
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
|
||||
|
||||
THIRD_API_ERROR(151001,"第三方服务异常->{0}",null),
|
||||
|
||||
@@ -88,6 +88,7 @@ public enum MessageEnum {
|
||||
MESSAGE_59("您有一个门店设计阶段报价任务待领取,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_60("您有一个门店已提交京东建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_61("您有一个门店京东外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_62("您有一个门店设计阶段设计图待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@ public class DecorationDesignInfoDAO {
|
||||
@Resource
|
||||
DecorationDesignInfoMapper decorationDesignInfoMapper;
|
||||
|
||||
public DecorationDesignInfoDO getById(Long id){
|
||||
if(id == null){
|
||||
public DecorationDesignInfoDO getById(Long id) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
}
|
||||
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<>();
|
||||
}
|
||||
Example example = new Example(DecorationDesignInfoDO.class);
|
||||
@@ -39,29 +40,41 @@ public class DecorationDesignInfoDAO {
|
||||
return decorationDesignInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public Integer insertSelective(DecorationDesignInfoDO decorationDesignInfoDO){
|
||||
public Integer insertSelective(DecorationDesignInfoDO decorationDesignInfoDO) {
|
||||
return decorationDesignInfoMapper.insertSelective(decorationDesignInfoDO);
|
||||
}
|
||||
|
||||
public Integer updateByPrimaryKeySelective(DecorationDesignInfoDO decorationDesignInfoDO){
|
||||
public Integer updateByPrimaryKeySelective(DecorationDesignInfoDO decorationDesignInfoDO) {
|
||||
return decorationDesignInfoMapper.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
}
|
||||
|
||||
public DecorationDesignInfoDO getByShopId(Long shopId){
|
||||
if(shopId == null){
|
||||
public DecorationDesignInfoDO getByShopId(Long shopId) {
|
||||
if (shopId == null) {
|
||||
return null;
|
||||
}
|
||||
return decorationDesignInfoMapper.selectByShopId(shopId);
|
||||
}
|
||||
|
||||
// 根据设计师人员id和店铺阶段 SHOP_SUB_STAGE_STATUS_901 查询店铺信息
|
||||
public List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(String userId, String keyword){
|
||||
if(userId == null){
|
||||
public List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(String userId, String keyword) {
|
||||
if (userId == null) {
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,5 +18,12 @@ public interface DecorationDesignInfoMapper extends Mapper<DecorationDesignInfoD
|
||||
DecorationDesignInfoDO selectByShopId(Long shopId);
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -27,6 +27,17 @@
|
||||
<result column="design_submit_time" jdbcType="TIMESTAMP" property="designSubmitTime" />
|
||||
<result column="quotation_submit_time" jdbcType="TIMESTAMP" property="quotationSubmitTime" />
|
||||
</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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -90,7 +90,8 @@ public class AddSignFranchiseRequest {
|
||||
@ApiModelProperty("合同金额")
|
||||
@NotBlank(message = "合同金额不能为空")
|
||||
private String contractAmount;
|
||||
@ApiModelProperty("合伙签约人1//废弃")
|
||||
@NotBlank(message = "合伙签约人1不能为空")
|
||||
@ApiModelProperty("合伙签约人1")
|
||||
private String partnershipSignatoryFirst;
|
||||
@ApiModelProperty("合伙签约人2")
|
||||
private String partnershipSignatorySecond;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.dto.PartnerBankInfoDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -7,6 +8,7 @@ import lombok.Data;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AddSignFranchiseResponse {
|
||||
@@ -86,7 +88,7 @@ public class AddSignFranchiseResponse {
|
||||
private String franchiseeType;
|
||||
|
||||
@ApiModelProperty("交款人")
|
||||
private String payName;
|
||||
private List<String> payName;
|
||||
|
||||
@ApiModelProperty("营业执照名称")
|
||||
private String licenseName;
|
||||
@@ -107,12 +109,8 @@ public class AddSignFranchiseResponse {
|
||||
@ApiModelProperty("加盟商身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty("加盟商结算账户")
|
||||
private String bankCardNo;
|
||||
@ApiModelProperty("开户行")
|
||||
private String bank;
|
||||
@ApiModelProperty("支行")
|
||||
private String subBank;
|
||||
@ApiModelProperty("加盟商付款资料")
|
||||
private List<PartnerBankInfoDTO> partnerPayData;
|
||||
|
||||
@ApiModelProperty("身份证地址")
|
||||
private String idCardAddress;
|
||||
|
||||
@@ -171,4 +171,8 @@ public interface DecorationService {
|
||||
* @return
|
||||
*/
|
||||
Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user);
|
||||
|
||||
Boolean updateDesignLeader(Long shopId, String userId);
|
||||
|
||||
Boolean updateDesignUser(Long shopId, String userId);
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//查询测量阶段的设计组长
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||
if (measureDO!=null){
|
||||
if (measureDO != null) {
|
||||
decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId());
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
|
||||
decorationDesignVO.setDesignLeaderName(userName);
|
||||
@@ -828,6 +828,63 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
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) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (Objects.isNull(shopInfo)) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.PartnerBankInfoDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
@@ -453,7 +454,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
//线索id
|
||||
Long lineId = shopInfoDO.getLineId();
|
||||
//缴款信息
|
||||
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId, 1, shopId);
|
||||
List<LinePayDO> linePayList = linePayMapper.getFranchiseFeePayInfoByShopId(shopId);
|
||||
// //铺位信息
|
||||
// PointInfoDO pointInfoDO = pointInfoMapper.getDataByShopIdAndLineId(lineId, shopId);
|
||||
//证照办理
|
||||
@@ -524,19 +525,25 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId());
|
||||
addSignFranchiseResponse.setRegionName(regionInfo.getName());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(linePayDO)) {
|
||||
addSignFranchiseResponse.setPayName(linePayDO.getPayUserName());
|
||||
addSignFranchiseResponse.setBankCardNo(linePayDO.getPayAccount());
|
||||
addSignFranchiseResponse.setBank(linePayDO.getBankName());
|
||||
addSignFranchiseResponse.setSubBank(linePayDO.getBranchBankName());
|
||||
if (Objects.nonNull(linePayDO.getPayTime())) {
|
||||
addSignFranchiseResponse.setPayDate(linePayDO.getPayTime());
|
||||
} else {
|
||||
List<Date> payTimeList = JsonToDate(linePayDO.getCombinedField());
|
||||
Collections.sort(payTimeList);
|
||||
addSignFranchiseResponse.setPayDate(payTimeList.get(0));
|
||||
if(CollectionUtils.isNotEmpty(linePayList)){
|
||||
Set<String> payNameSet = new HashSet<>();
|
||||
List<Date> payTimeList = new ArrayList<>();
|
||||
List<PartnerBankInfoDTO> partnerPayData = new ArrayList<>();
|
||||
for (LinePayDO linePayDO : linePayList){
|
||||
payNameSet.add(linePayDO.getPayUserName());
|
||||
payTimeList.add(linePayDO.getPayTime());
|
||||
PartnerBankInfoDTO dto = new PartnerBankInfoDTO();
|
||||
dto.setBankCardNo(linePayDO.getPayAccount());
|
||||
dto.setBank(linePayDO.getBankName());
|
||||
dto.setSubBank(linePayDO.getBranchBankName());
|
||||
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)) {
|
||||
addSignFranchiseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());
|
||||
|
||||
@@ -276,7 +276,7 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
}
|
||||
|
||||
public String getXgjShopName(LineInfoDO lineInfoDO, ShopInfoDO shopInfoDO,SignFranchiseDO signFranchiseDO) {
|
||||
if (StringUtils.isBlank(shopInfoDO.getShopCode())) {
|
||||
if (StringUtils.isBlank(shopInfoDO.getShopCode())||signFranchiseDO==null) {
|
||||
return null;
|
||||
}
|
||||
String shopCode = shopInfoDO.getShopCode().trim();
|
||||
@@ -310,6 +310,10 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
? "S" + shopInfoDO.getShopName() + "(" + signFranchiseDO.getPartnershipSignatoryFirst() + ")"
|
||||
: "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 (shopCode.matches("MZGM\\d*")) {
|
||||
|
||||
@@ -193,4 +193,18 @@ public class PCDecorationController {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.BranchShopDetailResponse;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ShopResponse;
|
||||
@@ -144,4 +145,10 @@ public class MiniShopController {
|
||||
return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage));
|
||||
}
|
||||
|
||||
@ApiOperation("开店详情/左边小窗")
|
||||
@GetMapping("/getBranchShopDetail")
|
||||
public ResponseResult<BranchShopDetailResponse> getBranchShopDetail(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(shopService.getBranchShopDetail(shopId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user