Merge #102 into master from cc_20260414_invoice

开票管理

* cc_20260414_invoice: (6 commits squashed)

  - fix:门店开票信息

  - fix:新增企业开票校验接口;闭店列表新增筛选条件

  - fix

  - Merge branch 'master' into cc_20260414_invoice

  - Merge remote-tracking branch 'origin/cc_20260414_invoice' into cc_20260414_invoice
    
    # Conflicts:
    #	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java

  - Merge branch 'master' into cc_20260414_invoice
    
    # Conflicts:
    #	coolstore-partner-model/src/main/java/com/cool/store/request/StoreMasterDTO.java

Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/102
This commit is contained in:
王非凡
2026-04-17 08:53:50 +00:00
committed by 正新
parent 7102127358
commit 8c4f55ab20
14 changed files with 120 additions and 3 deletions

View File

@@ -28,4 +28,9 @@ public interface BuildInformationService {
* @param user 用户
*/
Boolean operationsConsultantAudit(AuditApproveRequest request, LoginUserInfo user);
/**
* 开票信息企业校验
*/
Boolean companyInvoiceVerify(Long shopId);
}

View File

@@ -12,10 +12,12 @@ import com.cool.store.enums.*;
import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.ApplyLicenseMapper;
import com.cool.store.mapper.WarehouseInfoMapper;
import com.cool.store.request.AuditApproveRequest;
import com.cool.store.request.BuildInformationRequest;
import com.cool.store.request.BuildSettlerRequest;
import com.cool.store.response.AddSignFranchiseResponse;
import com.cool.store.response.BuildInformationResponse;
import com.cool.store.service.*;
import com.cool.store.utils.RedisConstantUtil;
@@ -88,6 +90,10 @@ public class BuildInformationServiceImpl implements BuildInformationService {
private OperationLogDAO operationLogDAO;
@Autowired
private RegionDao regionDao;
@Resource
private SignFranchiseService signFranchiseService;
@Resource
private ApplyLicenseMapper applyLicenseMapper;
@Override
@@ -350,6 +356,9 @@ public class BuildInformationServiceImpl implements BuildInformationService {
response.setSettlerBankBackPhotoUrl(informationDO.getSettlerBankBackPhotoUrl());
response.setSettlerIsSamePartner(informationDO.getSettlerIsSamePartner());
response.setJuridicalIsSamePartner(informationDO.getJuridicalIsSamePartner());
response.setInvoiceType(informationDO.getInvoiceType());
response.setInvoiceTitle(informationDO.getInvoiceTitle());
response.setInvoiceTin(informationDO.getInvoiceTin());
}
private static @NotNull OrderSysInfoDO getOrderSysInfoDO(BuildInformationRequest request) {
@@ -465,6 +474,27 @@ public class BuildInformationServiceImpl implements BuildInformationService {
return true;
}
@Override
public Boolean companyInvoiceVerify(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (Objects.isNull(shopInfo)) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
ShopStageInfoDO stageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_3);
if (!stageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LICENSE_LEGAL_STAGE_FAIL);
}
LicenseTransactDO license = applyLicenseMapper.selectByShopId(shopId);
if (Objects.isNull(license) || StringUtils.isBlank(license.getLicenseLegalPerson())) {
throw new ServiceException(ErrorCodeEnum.LICENSE_LEGAL_STAGE_FAIL);
}
AddSignFranchiseResponse signFranchise = signFranchiseService.getSignFranchise(shopId);
if (!signFranchise.getPartnershipSignatoryFirst().equals(license.getLicenseLegalPerson())
&& !signFranchise.getPartnershipSignatorySecond().equals(license.getLicenseLegalPerson())) {
throw new ServiceException(ErrorCodeEnum.SIGNER_NOT_EQUAL_LEGAL_PERSON);
}
return true;
}
}

View File

@@ -150,6 +150,9 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
settlerInfo.setSettlerBankPhotoUrl(buildInformationDO.getSettlerBankPhotoUrl());
settlerInfo.setSettlerBankBackPhotoUrl(buildInformationDO.getSettlerBankBackPhotoUrl());
storeMasterDTO.setSettlerInfo(settlerInfo);
storeMasterDTO.setInvoiceType(buildInformationDO.getInvoiceType());
storeMasterDTO.setInvoiceTitle(buildInformationDO.getInvoiceTitle());
storeMasterDTO.setInvoiceTin(buildInformationDO.getInvoiceTin());
}

View File

@@ -369,12 +369,21 @@ public class WalletServiceImpl implements WalletService {
@Override
public AccountDataVO getAccountList(AccountQueryRequest request) {
String storeId = getStoreId(request);
// 处理shopInfo和store表storeId不一致的问题使用开店shop_info表的storeId
if (StringUtils.isNotBlank(request.getStoreId())) {
StoreDO storeDO = storeDao.getByStoreId(request.getStoreId());
ShopInfoDO shopInfo = shopInfoDAO.getShopInfoByShopCode(storeDO.getStoreNum());
if (Objects.nonNull(shopInfo) && !storeDO.getStoreId().equals(shopInfo.getStoreId())) {
storeId = shopInfo.getStoreId();
}
}
List<AccountInfoDTO> accountInfo = walletApiService.getAccountInfo(new OutStoreIdRequest(storeId));
String finalStoreId = storeId;
List<AccountInfoVO> accountList = accountInfo.stream()
.filter(v -> Objects.isNull(request.getWalletType()) || request.getWalletType().equals(v.getWalletType()))
.map(v -> {
AccountInfoVO vo = BeanUtil.toBean(v, AccountInfoVO.class);
String key = MessageFormat.format(RedisConstant.WALLET_OPEN_FAIL, storeId, String.valueOf(v.getWalletType()));
String key = MessageFormat.format(RedisConstant.WALLET_OPEN_FAIL, finalStoreId, String.valueOf(v.getWalletType()));
vo.setFailReason(redisUtilPool.getString(key));
return vo;
}).collect(Collectors.toList());