税务接口

This commit is contained in:
ZZM 2025-06-24 16:07:50 +08:00
parent 11c92dcdd9
commit c952344f46
20 changed files with 250 additions and 26 deletions

View File

@ -33,7 +33,13 @@ public class CrmQycbrsController {
@PostMapping("/queryByNsrsbhAndTime")
public Result<List<CrmQycbrs>> queryByNsrsbhAndTime(@RequestBody CrmParamAndTimeVO vo) {
List<CrmQycbrs> qycbrsList = crmQycbrsService.getQycbrsListByParamAndTime(vo);
List<CrmQycbrs> qycbrsList = crmQycbrsService.getQycbrsListByNsrsbhAndTime(vo);
return R.ok(qycbrsList);
}
@PostMapping("/queryByDjxhAndTime")
public Result<List<CrmQycbrs>> queryByDjxhAndTime(@RequestBody CrmParamAndTimeVO vo) {
List<CrmQycbrs> qycbrsList = crmQycbrsService.getQycbrsListByDjxhAndTime(vo);
return R.ok(qycbrsList);
}

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/qyfxmx")
@RequestMapping("/crmQyfxmx")
@Api(tags = "企业风险明细信息")
public class CrmQyfxmxController {
@ -33,7 +33,14 @@ public class CrmQyfxmxController {
@PostMapping("/queryByNsrsbhAndTime")
@ApiOperation("根据登记序号和月份(选填)查询")
public Result<List<CrmQyfxmx>> queryByNsrsbhAndTime(@RequestBody CrmParamAndTimeVO vo){
List<CrmQyfxmx> qyfxmxList = crmQyfxmxService.getQyfxmxListByParamAndTime(vo);
List<CrmQyfxmx> qyfxmxList = crmQyfxmxService.getQyfxmxListByNsrsbhAndTime(vo);
return R.ok(qyfxmxList);
}
@PostMapping("/queryByDjxhAndTime")
@ApiOperation("根据登记序号和月份(选填)查询")
public Result<List<CrmQyfxmx>> queryByDjxhAndTime(@RequestBody CrmParamAndTimeVO vo){
List<CrmQyfxmx> qyfxmxList = crmQyfxmxService.getQyfxmxListByDjxhAndTime(vo);
return R.ok(qyfxmxList);
}

View File

@ -29,10 +29,17 @@ public class CrmQyjxfpController {
return R.ok(qyjxfp);
}
@PostMapping("/queryMergeListByParamAndTime")
@PostMapping("/queryMergeListByNsrsbhAndTime")
@ApiOperation("通过纳税人识别号和年度(选填),查询企业进项发票和企业销项发票信息列表")
public Result queryMergeListByParamAndTime(@RequestBody CrmParamAndTimeVO vo){
CrmMergeListVO mergeList = crmQyjxfpService.getMergeListByParamAndTime(vo);
public Result queryMergeListByNsrsbhAndTime(@RequestBody CrmParamAndTimeVO vo){
CrmMergeListVO mergeList = crmQyjxfpService.getMergeListByNsrsbhAndTime(vo);
return R.ok(mergeList);
}
@PostMapping("/queryMergeListByShxydmAndTime")
@ApiOperation("通过纳税人识别号和年度(选填),查询企业进项发票和企业销项发票信息列表")
public Result queryMergeListByShxydmAndTime(@RequestBody CrmParamAndTimeVO vo){
CrmMergeListVO mergeList = crmQyjxfpService.getMergeListByShxydmAndTime(vo);
return R.ok(mergeList);
}

View File

@ -34,7 +34,14 @@ public class CrmQynsrdjController {
@PostMapping("/queryByNsrsbhAndTime")
@ApiOperation("根据纳税人识别号和评价年度(选填)查询")
public Result<List<CrmQynsrdj>> queryByNsrsbhAndTime(@RequestBody CrmParamAndTimeVO vo) {
List<CrmQynsrdj> qynsrdjList = crmQynsrdjService.getQynsrdjListByParamAndTime(vo);
List<CrmQynsrdj> qynsrdjList = crmQynsrdjService.getQynsrdjListByNsrsbhAndTime(vo);
return R.ok(qynsrdjList);
}
@PostMapping("/queryByDjxhAndTime")
@ApiOperation("根据登记序号和评价年度(选填)查询")
public Result<List<CrmQynsrdj>> queryByDjxhAndTime(@RequestBody CrmParamAndTimeVO vo) {
List<CrmQynsrdj> qynsrdjList = crmQynsrdjService.getQynsrdjListByDjxhAndTime(vo);
return R.ok(qynsrdjList);
}

View File

@ -33,7 +33,14 @@ public class CrmQysdsndsbController {
@PostMapping("/queryByNsrsbhAndTime")
@ApiOperation("根据纳税人识别号和年度(选填)查询")
public Result<List<CrmQysdsndsb>> queryByNsrsbhAndTime(@RequestBody CrmParamAndTimeVO vo) {
List<CrmQysdsndsb> qysdsndsbList = crmQysdsndsbService.getQysdsndsbListByParamAndTime(vo);
List<CrmQysdsndsb> qysdsndsbList = crmQysdsndsbService.getQysdsndsbListByNsrsbhAndTime(vo);
return R.ok(qysdsndsbList);
}
@PostMapping("/queryByDjxhAndTime")
@ApiOperation("根据纳税人识别号和年度(选填)查询")
public Result<List<CrmQysdsndsb>> queryByDjxhAndTime(@RequestBody CrmParamAndTimeVO vo) {
List<CrmQysdsndsb> qysdsndsbList = crmQysdsndsbService.getQysdsndsbListByDjxhAndTime(vo);
return R.ok(qysdsndsbList);
}

View File

@ -31,10 +31,17 @@ public class CrmQysflController {
return R.ok(qysfl);
}
@PostMapping("/queryByDjxhAndTime")
@ApiOperation("根据登记序号和评价年度(选填)查询")
public Result<List<CrmQysfl>> queryByDjxhAndTime(@RequestBody CrmParamAndTimeVO vo){
List<CrmQysfl> qysflList = crmQysflService.getQysflByDjxhAndTimeList(vo);
return R.ok(qysflList);
}
@PostMapping("/queryByNsrsbhAndTime")
@ApiOperation("根据纳税人识别号和评价年度(选填)查询")
public Result<List<CrmQysfl>> queryByNsrsbhAndTime(@RequestBody CrmParamAndTimeVO vo){
List<CrmQysfl> qysflList = crmQysflService.getQysflByParamAndTimeList(vo);
List<CrmQysfl> qysflList = crmQysflService.getQysflByNsrsbhAndTimeList(vo);
return R.ok(qysflList);
}

View File

@ -41,9 +41,16 @@ public interface ICrmQycbrsService extends BaseService<CrmQycbrs> {
List<CrmQycbrs> getQycbrsList(CrmQycbrs crmQycbrs);
/**
* 根据等级序号和月份(选填)查询企业参保人数信息列表
* 根据纳税人识别号和月份(选填)查询企业参保人数信息列表
* @param vo
* @return
*/
List<CrmQycbrs> getQycbrsListByParamAndTime(CrmParamAndTimeVO vo);
List<CrmQycbrs> getQycbrsListByNsrsbhAndTime(CrmParamAndTimeVO vo);
/**
* 根据登记序号和月份(选填)查询企业参保人数信息列表
* @param vo
* @return
*/
List<CrmQycbrs> getQycbrsListByDjxhAndTime(CrmParamAndTimeVO vo);
}

View File

@ -41,10 +41,17 @@ public interface ICrmQyfxmxService extends BaseService<CrmQyfxmx> {
*/
List<CrmQyfxmx> getQyfxmxList(CrmQyfxmx crmQyfxmx);
/**
* 通过纳税人识别号和月份(选填)查询企业风险明细信息列表
* @param vo
* @return
*/
List<CrmQyfxmx> getQyfxmxListByNsrsbhAndTime(CrmParamAndTimeVO vo);
/**
* 通过登记序号和月份(选填)查询企业风险明细信息列表
* @param vo
* @return
*/
List<CrmQyfxmx> getQyfxmxListByParamAndTime(CrmParamAndTimeVO vo);
List<CrmQyfxmx> getQyfxmxListByDjxhAndTime(CrmParamAndTimeVO vo);
}

View File

@ -42,10 +42,17 @@ public interface ICrmQyjxfpService extends BaseService<CrmQyjxfp> {
*/
List<CrmQyjxfp> getQyjxfpList(CrmQyjxfp crmQyjxfp);
/**
* 通过纳税人识别号和年度(选填),查询企业进项发票和企业销项发票信息列表
* @param vo
* @return
*/
CrmMergeListVO getMergeListByNsrsbhAndTime(CrmParamAndTimeVO vo);
/**
* 通过社会信用代码和年度(选填),查询企业进项发票和企业销项发票信息列表
* @param vo
* @return
*/
CrmMergeListVO getMergeListByParamAndTime(CrmParamAndTimeVO vo);
CrmMergeListVO getMergeListByShxydmAndTime(CrmParamAndTimeVO vo);
}

View File

@ -41,10 +41,17 @@ public interface ICrmQynsrdjService extends BaseService<CrmQynsrdj> {
*/
List<CrmQynsrdj> getQynsrdjList(CrmQynsrdj crmQynsrdj);
/**
* 根据纳税人识别号和评价年度(选填)查询
* @param vo
* @return
*/
List<CrmQynsrdj> getQynsrdjListByNsrsbhAndTime(CrmParamAndTimeVO vo);
/**
* 根据登记序号和评价年度(选填)查询
* @param vo
* @return
*/
List<CrmQynsrdj> getQynsrdjListByParamAndTime(CrmParamAndTimeVO vo);
List<CrmQynsrdj> getQynsrdjListByDjxhAndTime(CrmParamAndTimeVO vo);
}

View File

@ -43,10 +43,17 @@ public interface ICrmQysdsndsbService extends BaseService<CrmQysdsndsb> {
List<CrmQysdsndsb> getQysdsndsbList(CrmQysdsndsb crmQysdsndsb);
/**
* 根据纳税人识别号和年度查询年度(选填)申报信息列表
* @param vo
* @return
*/
List<CrmQysdsndsb> getQysdsndsbListByNsrsbhAndTime(CrmParamAndTimeVO vo);
/**
* 根据登记序号和年度查询年度(选填)申报信息列表
* @param vo
* @return
*/
List<CrmQysdsndsb> getQysdsndsbListByParamAndTime(CrmParamAndTimeVO vo);
List<CrmQysdsndsb> getQysdsndsbListByDjxhAndTime(CrmParamAndTimeVO vo);
}

View File

@ -41,10 +41,17 @@ public interface ICrmQysflService extends BaseService<CrmQysfl> {
*/
List<CrmQysfl> getQysflList(CrmQysfl crmQysfl);
/**
* 根据纳税人识别号和月份(月份)
* @param vo
* @return
*/
List<CrmQysfl> getQysflByNsrsbhAndTimeList(CrmParamAndTimeVO vo);
/**
* 根据登记序号和月份(月份)
* @param vo
* @return
*/
List<CrmQysfl> getQysflByParamAndTimeList(CrmParamAndTimeVO vo);
List<CrmQysfl> getQysflByDjxhAndTimeList(CrmParamAndTimeVO vo);
}

View File

@ -42,10 +42,17 @@ public interface ICrmQyxxfpService extends BaseService<CrmQyxxfp> {
List<CrmQyxxfp> getQyxxfpList(CrmQyxxfp crmQyxxfp);
/**
* 通过纳税人识别号和年度(选填)查询企业销项发票信息
* @param vo
* @return
*/
List<CrmQyxxfp> getQyxxfpListByNsrsbhAndTime(CrmParamAndTimeVO vo);
/**
* 通过社会信用代码和年度(选填)查询企业销项发票信息
* @param vo
* @return
*/
List<CrmQyxxfp> getQyxxfpListByParamAndTime(CrmParamAndTimeVO vo);
List<CrmQyxxfp> getQyxxfpListByShxydmAndTime(CrmParamAndTimeVO vo);
}

View File

@ -50,7 +50,24 @@ public class CrmQycbrsServiceImpl extends BaseServiceImpl<CrmQycbrsMapper, CrmQy
}
@Override
public List<CrmQycbrs> getQycbrsListByParamAndTime(CrmParamAndTimeVO vo) {
public List<CrmQycbrs> getQycbrsListByDjxhAndTime(CrmParamAndTimeVO vo) {
QueryWrapper<CrmQycbrs> wrapper = new QueryWrapper<>();
wrapper.eq("djxh", vo.getParam());
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("yf", vo.getTime());
CrmQycbrs qycbrs = crmQycbrsMapper.selectOne(wrapper);
return qycbrs != null ?
Collections.singletonList(qycbrs) :
Collections.emptyList();
}
return crmQycbrsMapper.selectList(wrapper);
}
@Override
public List<CrmQycbrs> getQycbrsListByNsrsbhAndTime(CrmParamAndTimeVO vo) {
CrmQyjbxx crmQyjbxx = crmQyjbxxMapper.selectOne(new QueryWrapper<CrmQyjbxx>()
.select("djxh")

View File

@ -75,7 +75,24 @@ public class CrmQyfxmxServiceImpl extends BaseServiceImpl<CrmQyfxmxMapper, CrmQy
}
@Override
public List<CrmQyfxmx> getQyfxmxListByParamAndTime(CrmParamAndTimeVO vo) {
public List<CrmQyfxmx> getQyfxmxListByDjxhAndTime(CrmParamAndTimeVO vo) {
QueryWrapper<CrmQyfxmx> wrapper = new QueryWrapper<>();
wrapper.eq("djxh", vo.getParam());
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("yf", vo.getTime());
CrmQyfxmx qyfxmx = crmQyfxmxMapper.selectOne(wrapper);
return qyfxmx != null ?
Collections.singletonList(qyfxmx) :
Collections.emptyList();
}
return crmQyfxmxMapper.selectList(wrapper);
}
@Override
public List<CrmQyfxmx> getQyfxmxListByNsrsbhAndTime(CrmParamAndTimeVO vo) {
CrmQyjbxx crmQyjbxx = crmQyjbxxMapper.selectOne(new QueryWrapper<CrmQyjbxx>()
.select("djxh")
@ -89,7 +106,7 @@ public class CrmQyfxmxServiceImpl extends BaseServiceImpl<CrmQyfxmxMapper, CrmQy
QueryWrapper<CrmQyfxmx> wrapper = new QueryWrapper<>();
wrapper.eq("djxh", crmQyjbxx.getDjxh());
if (vo.getTime() != null) {
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("yf", vo.getTime());
CrmQyfxmx qyfxmx = crmQyfxmxMapper.selectOne(wrapper);
return qyfxmx != null ?

View File

@ -84,13 +84,43 @@ public class CrmQyjxfpServiceImpl extends BaseServiceImpl<CrmQyjxfpMapper, CrmQy
return crmQyjxfpMapper.selectList(crmQyjxfpQueryWrapper);
}
@Override
public CrmMergeListVO getMergeListByShxydmAndTime(CrmParamAndTimeVO vo) {
CrmMergeListVO mergeListVO = new CrmMergeListVO();
QueryWrapper<CrmQyjxfp> wrapper = new QueryWrapper<>();
wrapper.eq("shxydm", vo.getParam());
System.out.println(vo.getTime());
// 根据时间条件处理进项发票查询
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
// 添加时间条件
wrapper.eq("nd", vo.getTime());
CrmQyjxfp qyjxfp = crmQyjxfpMapper.selectOne(wrapper);
mergeListVO.setQyjxfpList(qyjxfp != null ?
Collections.singletonList(qyjxfp) :
Collections.emptyList());
} else {
// 无时间条件时直接查询列表
mergeListVO.setQyjxfpList(crmQyjxfpMapper.selectList(wrapper));
}
// 处理销项发票查询
List<CrmQyxxfp> qyxxfpList = crmQyxxfpService.getQyxxfpListByShxydmAndTime(vo);
mergeListVO.setQyxxfpList(qyxxfpList);
return mergeListVO;
}
/**
* 通过社会信用代码和年度(选填),查询企业进项发票和企业销项发票信息列表
* @param vo
* @return
*/
@Override
public CrmMergeListVO getMergeListByParamAndTime(CrmParamAndTimeVO vo) {
public CrmMergeListVO getMergeListByNsrsbhAndTime(CrmParamAndTimeVO vo) {
CrmMergeListVO mergeListVO = new CrmMergeListVO();
@ -124,7 +154,7 @@ public class CrmQyjxfpServiceImpl extends BaseServiceImpl<CrmQyjxfpMapper, CrmQy
}
// 处理销项发票查询
List<CrmQyxxfp> qyxxfpList = crmQyxxfpService.getQyxxfpListByParamAndTime(vo);
List<CrmQyxxfp> qyxxfpList = crmQyxxfpService.getQyxxfpListByNsrsbhAndTime(vo);
mergeListVO.setQyxxfpList(qyxxfpList);
return mergeListVO;

View File

@ -51,7 +51,7 @@ public class CrmQynsrdjServiceImpl extends BaseServiceImpl<CrmQynsrdjMapper, Crm
}
@Override
public List<CrmQynsrdj> getQynsrdjListByParamAndTime(CrmParamAndTimeVO vo){
public List<CrmQynsrdj> getQynsrdjListByNsrsbhAndTime(CrmParamAndTimeVO vo){
CrmQyjbxx crmQyjbxx = crmQyjbxxMapper.selectOne(new QueryWrapper<CrmQyjbxx>()
.select("djxh")
@ -77,4 +77,23 @@ public class CrmQynsrdjServiceImpl extends BaseServiceImpl<CrmQynsrdjMapper, Crm
// 无时间参数时返回匹配的所有记录
return crmQynsrdjMapper.selectList(wrapper);
}
@Override
public List<CrmQynsrdj> getQynsrdjListByDjxhAndTime(CrmParamAndTimeVO vo) {
QueryWrapper<CrmQynsrdj> wrapper = new QueryWrapper<>();
wrapper.eq("djxh", vo.getParam());
// 当时间参数存在时添加时间条件并返回单条结果
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("pjnd", vo.getTime());
CrmQynsrdj entity = crmQynsrdjMapper.selectOne(wrapper);
return entity != null ?
Collections.singletonList(entity) :
Collections.emptyList();
}
// 无时间参数时返回匹配的所有记录
return crmQynsrdjMapper.selectList(wrapper);
}
}

View File

@ -51,7 +51,24 @@ public class CrmQysdsndsbServiceImpl extends BaseServiceImpl<CrmQysdsndsbMapper,
}
@Override
public List<CrmQysdsndsb> getQysdsndsbListByParamAndTime(CrmParamAndTimeVO vo) {
public List<CrmQysdsndsb> getQysdsndsbListByDjxhAndTime(CrmParamAndTimeVO vo) {
QueryWrapper<CrmQysdsndsb> wrapper = new QueryWrapper<>();
wrapper.eq("djxh", vo.getParam());
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("nd", vo.getTime());
CrmQysdsndsb qysdsndsb = crmQysdsndsbMapper.selectOne(wrapper);
return qysdsndsb != null ?
Collections.singletonList(qysdsndsb) :
Collections.emptyList();
}
return crmQysdsndsbMapper.selectList(wrapper);
}
@Override
public List<CrmQysdsndsb> getQysdsndsbListByNsrsbhAndTime(CrmParamAndTimeVO vo) {
CrmQyjbxx crmQyjbxx = crmQyjbxxMapper.selectOne(new QueryWrapper<CrmQyjbxx>()
.select("djxh")

View File

@ -50,7 +50,24 @@ public class CrmQysflServiceImpl extends BaseServiceImpl<CrmQysflMapper, CrmQysf
}
@Override
public List<CrmQysfl> getQysflByParamAndTimeList(CrmParamAndTimeVO vo) {
public List<CrmQysfl> getQysflByDjxhAndTimeList(CrmParamAndTimeVO vo) {
QueryWrapper<CrmQysfl> wrapper = new QueryWrapper<>();
wrapper.eq("djxh", vo.getParam());
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("yf", vo.getTime());
CrmQysfl crmQysfl = crmQysflMapper.selectOne(wrapper);
return crmQysfl != null ?
Collections.singletonList(crmQysfl) :
Collections.emptyList();
}
return crmQysflMapper.selectList(wrapper);
}
@Override
public List<CrmQysfl> getQysflByNsrsbhAndTimeList(CrmParamAndTimeVO vo) {
CrmQyjbxx crmQyjbxx = crmQyjbxxMapper.selectOne(new QueryWrapper<CrmQyjbxx>()
.select("djxh")

View File

@ -51,7 +51,24 @@ public class CrmQyxxfpServiceImpl extends BaseServiceImpl<CrmQyxxfpMapper, CrmQy
}
@Override
public List<CrmQyxxfp> getQyxxfpListByParamAndTime(CrmParamAndTimeVO vo) {
public List<CrmQyxxfp> getQyxxfpListByShxydmAndTime(CrmParamAndTimeVO vo) {
QueryWrapper<CrmQyxxfp> wrapper = new QueryWrapper<>();
wrapper.eq("shxydm", vo.getParam());
if (vo.getTime() != null && !vo.getTime().isEmpty()) {
wrapper.eq("nd", vo.getTime());
CrmQyxxfp qyxxfp = crmQyxxfpMapper.selectOne(wrapper);
return qyxxfp != null ?
Collections.singletonList(qyxxfp) :
Collections.emptyList();
}
return crmQyxxfpMapper.selectList(wrapper);
}
@Override
public List<CrmQyxxfp> getQyxxfpListByNsrsbhAndTime(CrmParamAndTimeVO vo) {
CrmQyjbxx crmQyjbxx = crmQyjbxxMapper.selectOne(new QueryWrapper<CrmQyjbxx>()
.select("shxydm")