本文解答了关于《增值税发票分类》相关内容,同时关于1、购买增值税普通发票罪量刑标准,2、购买增值税专用发票罪量刑标准,3、增值税发票管理系统,4、增值税电子专票开具流程,5、税务发票查询,的相关问答本篇文章福途教育网小编也整理了进来,希望对您有帮助。
增值税发票分类
*
* @param directoryId
* @param invoiceCategory
* @param isInvoice 是否有增值税发票
* @return
*/
@Transactional(rollbackFor = Exception.class)
public SuccessResponse updateInvoiceCategory(long directoryId, String invoiceCategory, Boolean isInvoice) {
AuthorityOpLogDto opLogDto = new AuthorityOpLogDto(directoryId).
sysLogType(SystemLogTypeEnum.VAT_DIRECTORY).
subSystem(SubSystemEnum.AUTHORITY).
operationType(OperationType.UPDATE).
operateContent("更新增值税类型");
try {
Map queryParam = new HashMap<>(2);
queryParam.put("directoryId", directoryId);
AuthDirectory authDirectory = (AuthDirectory) ParameterUtil.getParameter(AuthDirectory.class, queryParam);
if (null == authDirectory) {
return opLogDto.opResult(false).uuid(authDirectory.getUuid()).objectName(authDirectory.getDirectoryName()).buildReturn();
}
AuthDirectoryParam authDirectoryParam = new AuthDirectoryParam();
authDirectoryParam.setUuid(authDirectory.getUuid());
authDirectoryParam.setDirectoryId(authDirectory.getDirectoryId());
authDirectoryParam.setIsInvoice(isInvoice);
authDirectoryParam.setInvoiceCategory(invoiceCategory);
authDirectoryParam.setUpdateUserId(authDirectory.getCreateUserId());
authDirectoryParam.setUpdateUserName(authDirectory.getCreateUserName());
authDirectoryParam.setUpdateTime(new Date());
authDirectoryService.updateAuthDirectoryByUuid(authDirectoryParam);
return opLogDto.opResult(true).uuid(authDirectory.getUuid()).objectName(authDirectory.getDirectoryName()).buildReturn();
} catch (Exception e) {
LOGGER.error("更新增值税类型失败,当前被操作对象directoryId={},异常信息:{}", directoryId, e);
return opLogDto.opResult(false).buildReturn();
}
}
/**
* 批量获取增值税类型信息
*
* @param directoryIdList
* @return
*/
public List getInvoiceCategoryInfoList(List directoryIdList) {
List vatDirectoryInvoiceCategoryVoList = new ArrayList<>();
if (CollectionUtil.isEmpty(directoryIdList)) {
return vatDirectoryInvoiceCategoryVoList;
}
try {
Map mapParam = new HashMap<>(2);
mapParam.put("directoryIdList", directoryIdList);
List vatList = authDirectoryService.getAuthDirectoryListByDirectoryIdList(mapParam);
if (CollectionUtil.isEmpty(vatList)) {
return vatDirectoryInvoiceCategoryVoList;
}
return vatList.stream().map(vatCategory -> {
VatDirectoryInvoiceCategoryVo vatDirectoryInvoiceCategoryVo = new VatDirectoryInvoiceCategoryVo();
vatDirectoryInvoiceCategoryVo.setDirectoryId(vatCategory.getDirectoryId());
vatDirectoryInvoiceCategoryVo.setIsInvoice(vatCategory.getIsInvoice());
vatDirectoryInvoiceCategoryVo.setInvoiceCategory(vatCategory.getInvoiceCategory());
return vatDirectoryInvoiceCategoryVo;
}).collect(Collectors.toList());
} catch (Exception e) {
LOGGER.error("批量获取增值税类型信息失败", e);
return vatDirectoryInvoiceCategoryVoList;
}
}
/**
* 根据关联单位id查询属地id
*
* @param unitId
* @return
*/
public String getTaxplaceIdByUnitId(String unitId) {
String taxplaceId = "";
try {
Map queryParam = new HashMap<>(3);
queryParam.put("unitId", unitId);
queryParam.put("directoryType", DirectoryTypeEnum.AUTH.getCode());
queryParam.put("status", EnableDisableStatusEnum.ENABLE.getCode());
AuthDirectory authDirectory = (AuthDirectory) ParameterUtil.getParameter(AuthDirectory.class, queryParam);
if (null == authDirectory) {
LOGGER.debug("查询关联单位[unitId={}]时,认证目录中不存在该节点", unitId);
return taxplaceId;
}
queryParam = new HashMap<>(2);
queryParam.put("directoryId", authDirectory.getTaxplaceId());
queryParam.put("status", EnableDisableStatusEnum.ENABLE.getCode());
AuthDirectory authDirectoryTaxplace = (AuthDirectory) ParameterUtil.getParameter(AuthDirectory.class, queryParam);
if (null == authDirectoryTaxplace) {
LOGGER.debug("查询属地[directoryId={}]时,认证目录中不存在该节点", authDirectory.getTaxplaceId());
return taxplaceId;
}
taxplaceId = authDirectoryTaxplace.getTaxplaceId();
} catch (Exception e) {
LOGGER.error("查询属地失败", e);
return taxplaceId;
}
return taxplaceId;
}
/**
* 根据税号设置关联单位属地
*
* @param unitId
* @param taxNo
*/
public OperationResult setTaxplaceByTaxNo(String unitId, String taxNo) {
OperationResult operationResult = new OperationResult();
if (StringUtils.isBlank(unitId)) {
operationResult.setStatus(false);
operationResult.setMessage("关联单位id不能为空");
return operationResult;
}
if (StringUtils.isBlank(taxNo)) {
operationResult.setStatus(true);
operationResult.setMessage("属地已被清空");
return operationResult;
}
String relativeUnitTaxplaceId = getTaxplaceIdByTaxNo(taxNo);
if (StringUtils.isBlank(relativeUnitTaxplaceId)) {
operationResult.setStatus(false);
operationResult.setMessage("找不到指定注册号对应的属地");
return operationResult;
}
AuthorityOpLogDto opLogDto = new AuthorityOpLogDto(Long.parseLong(unitId)).
sysLogType(SystemLogTypeEnum.VAT_DIRECTORY).
subSystem(SubSystemEnum.AUTHORITY).
operationType(OperationType.UPDATE).
operateContent("根据税号设置关联单位");
try {
Map queryParam = new HashMap<>(3);
queryParam.put("unitId", unitId);
queryParam.put("directoryType", DirectoryTypeEnum.AUTH.getCode());
AuthDirectory authDirectory = (AuthDirectory) ParameterUtil.getParameter(AuthDirectory.class, queryParam);
if (null == authDirectory) {
opLogDto.opResult(false).message("认证目录中不存在该节点").buildReturn();
}
AuthDirectoryParam authDirectoryParam = new AuthDirectoryParam();
authDirectoryParam.setUuid(authDi
总结:以上是编辑:【杨洋】整理及AI智能原创关于《增值税发票分类
》优质内容解答希望能帮助到您。