添加字段

release
yishiqihuasheng 2 years ago
parent 2f9031091f
commit c5055e6a82
  1. 53
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseRzTDxRecordInvoiceController.java
  2. 4
      dxhy-base/src/main/java/com/dxhy/base/service/tdxrecordinvoice/BaseFpbrzServiceImpl.java
  3. 16
      dxhy-base/src/main/resources/mapper/BaseFpbrzMapper.xml
  4. 5
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml
  5. 2
      dxhy-common/src/main/java/com/dxhy/common/constant/CommonConstants.java
  6. 9
      dxhy-customs/src/main/java/com/dxhy/customs/controller/CustomsRecordRzdkController.java
  7. 8
      dxhy-customs/src/main/java/com/dxhy/customs/controller/CustomsSignController.java
  8. 4
      dxhy-customs/src/main/java/com/dxhy/customs/model/TdxCustomsRecordDTO.java
  9. 1
      dxhy-customs/src/main/java/com/dxhy/customs/model/TdxCustomsRecordModelDTO.java
  10. 18
      dxhy-customs/src/main/java/com/dxhy/customs/service/impl/CustomsSignServiceImpl.java
  11. 108
      dxhy-customs/src/main/resources/mapper/CustomsRecordMapper.xml
  12. 7
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/controller/DomesticExportCustomsRzdkController.java
  13. 4
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/controller/DomesticExportInvoiceRzdkController.java
  14. 1
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/model/dto/TdxExportCustomsModelDTO.java
  15. 1
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/model/dto/TdxExportInvoiceModelDTO.java
  16. 2
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/ckzrz/impl/DomesticExportCustomsCkServiceImpl.java
  17. 2
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/ckzrz/impl/DomesticExportInvoiceCkServiceImpl.java
  18. 54
      dxhy-export-domestic/src/main/resources/mapper/DomesticExportCustomsMapper.xml
  19. 28
      dxhy-export-domestic/src/main/resources/mapper/DomesticExportInvoiceMapper.xml
  20. 14
      dxhy-sign/src/main/java/com/dxhy/sign/controller/SignFpqsController.java
  21. 20
      dxhy-sign/src/main/resources/mapper/SignInvoiceMapper.xml

@ -579,7 +579,18 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
@PostMapping("/brzxxlb")
@SysLog("调用不认证发票信息查询接口")
public ResponseEntity<?> brzRecordInvoice(@RequestBody Map<String, Object> map) {
String gfsh = (String)map.get("gfsh");
if(map.get("gfsh") == null || "".equals(map.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) map.get("gfsh");
if (map.get("companyCode") == null || "".equals(map.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String companyCode = (String) map.get("companyCode");
String fplx = (String)map.get("fplx");
String invoiceSource = (String)map.get("invoiceSource");
String fphm = (String)map.get("fphm");
@ -596,6 +607,8 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
int size = (int)map.get("size");
Map<String, Object> pramsMap = new HashMap<>(18);
String qsflag = getUserInfo().getQsStatus();
pramsMap.put("gfsh", gfsh);
pramsMap.put("companyCode",companyCode);
pramsMap.put("dbName", getUserInfo().getDbName());
pramsMap.put("isQs", getUserInfo().getQsStatus());
pramsMap.put("business", getUserInfo().getBusiness());
@ -604,25 +617,25 @@ public class BaseRzTDxRecordInvoiceController extends AbstractController {
List<String> gfshList = new ArrayList<>();
List<Tax> taxList = getUserInfo().getOrg();
List<Tax> newTaxList = new ArrayList<>();
if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
for (Tax tax : taxList) {
if (gfsh.equals(tax.getTaxno())) {
String upgradeStatus = tax.getUpgradeStatus();
if ("1".equals(upgradeStatus)) {
gfshList.add(gfsh);
}
}
}
} else {
for (Tax tax : taxList) {
String upgradeStatus = tax.getUpgradeStatus();
if ("1".equals(upgradeStatus)) {
newTaxList.add(tax);
}
}
gfshList = UserInfoUtil.getGfshAll(newTaxList);
}
pramsMap.put("gfsh", gfshList);
// if (!"99".equals(gfsh) && StringUtils.isNotBlank(gfsh)) {
// for (Tax tax : taxList) {
// if (gfsh.equals(tax.getTaxno())) {
// String upgradeStatus = tax.getUpgradeStatus();
// if ("1".equals(upgradeStatus)) {
// gfshList.add(gfsh);
// }
// }
// }
// } else {
// for (Tax tax : taxList) {
// String upgradeStatus = tax.getUpgradeStatus();
// if ("1".equals(upgradeStatus)) {
// newTaxList.add(tax);
// }
// }
// gfshList = UserInfoUtil.getGfshAll(newTaxList);
// }
// pramsMap.put("gfsh", gfshList);
if (!StringUtils.isBlank(fplx)) {
if (!"99".equals(fplx)) {

@ -69,8 +69,8 @@ public class BaseFpbrzServiceImpl extends MpBaseServiceImpl<BaseFpbrzDao, BaseTD
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
List<String> taxnoList = (List<String>)pramsMap.get("gfsh");
if (taxnoList == null || taxnoList.size() == 0) {
String taxno = (String) pramsMap.get("gfsh");
if (StringUtils.isBlank(taxno)) {
json.put("hjje", 0);
json.put("hjse", 0);
json.put("total", 0);

@ -49,11 +49,9 @@
bdkStatus,t.cxbdk_status cxbdkStatus,t.qs_name qsName,t.rzh_belong_date,t.ele_invoice_no,t.bdk_yy,t.bdk_message,
t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code
from t_dx_record_invoice t,t_dx_tax_current b
where t.gf_tax_no = b.taxno and
t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
where t.gf_tax_no = b.taxno
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and
t.invoice_amount-t.tax_amount &gt; 0 and
t.tax_amount &gt;= 0 and
@ -194,11 +192,9 @@
resultType="com.dxhy.base.entity.BaseTDxRecordInvoice" databaseId="mysql">
select count(1) id,sum(t.invoice_amount) invoiceAmount ,sum(tax_amount) taxAmount
from t_dx_record_invoice t,t_dx_tax_current b
where t.gf_tax_no = b.taxno and
t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
where t.gf_tax_no = b.taxno
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and
t.invoice_amount-t.tax_amount &gt; 0 and
t.tax_amount &gt;= 0 and

@ -55,10 +55,7 @@
t,t_dx_dk_count d
where t.taxno=d.taxno
and t.current_tax_period=d.skssq
and t.taxno in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and t.taxno = ${gfsh}
</select>
<select id="selectSggxcx" parameterType="java.util.Map"
resultMap="SggxcxResultMap" databaseId="mysql">

@ -75,4 +75,6 @@ public class CommonConstants {
* 默认返回页面的成功信息
*/
public static final String MSG_SUCC_DEFAULT = "请求处理成功!";
public static final String GFSH_OR_COMPANYCODE_MISS ="税号或者所属组织为空";
}

@ -73,6 +73,9 @@ public class CustomsRecordRzdkController extends AbstractController {
public ResponseEntity<?> querySgByPage(Page<?> page, @RequestBody TdxCustomsRecordModelDTO dto) {
try {
log.info("入参===》{}",dto);
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
return ResponseEntity
.ok(R.ok().put("data", tDxCustomsRecordService.querySgByPage(page, dto, this.getUserInfo())));
} catch (Exception e) {
@ -179,6 +182,9 @@ public class CustomsRecordRzdkController extends AbstractController {
@PostMapping("/queryBdkByPage")
public ResponseEntity<?> queryBdkByPage(Page<?> page, @RequestBody TdxCustomsRecordModelDTO dto) {
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
return ResponseEntity
.ok(R.ok().put("data", tDxCustomsRecordService.queryBdkByPage(page, dto, this.getUserInfo())));
} catch (Exception e) {
@ -193,6 +199,9 @@ public class CustomsRecordRzdkController extends AbstractController {
@PostMapping("/queryRzcxByPage")
public ResponseEntity<?> queryRzcxByPage(Page<?> page, @RequestBody TdxCustomsRecordModelDTO dto) {
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
return ResponseEntity
.ok(R.ok().put("data", tDxCustomsRecordService.queryRzcxByPage(page, dto, this.getUserInfo())));
} catch (Exception e) {

@ -38,7 +38,12 @@ public class CustomsSignController extends AbstractController {
@ResponseBody
@SysLog("缴款书手工签收-查询列表")
public ResponseEntity<?> queryManualSign(Page<?> page, @RequestBody TdxCustomsRecordDTO entity) {
try {
if (StringUtils.isBlank(entity.getGfsh())|| StringUtils.isBlank(entity.getCompanyCode())){
return ResponseEntity
.ok(R.error("税号或所属组织不能为空"));
}
return ResponseEntity
.ok(R.ok().put("data", customsSignService.queryManualSign(page, entity, this.getUserInfo())));
} catch (Exception e) {
@ -166,6 +171,9 @@ public class CustomsSignController extends AbstractController {
@SysLog("缴款书签收-查询列表")
public ResponseEntity<?> querySign(Page<?> page, @RequestBody TdxCustomsRecordDTO entity) {
try {
if (StringUtils.isBlank(entity.getGfsh())||StringUtils.isBlank(entity.getCompanyCode())){
return ResponseEntity.ok(R.error("税号或所属组织不能为空"));
}
return ResponseEntity.ok(Objects
.requireNonNull(R.ok().put("data", customsSignService.querySign(page, entity, this.getUserInfo()))));
} catch (Exception e) {

@ -49,6 +49,10 @@ public class TdxCustomsRecordDTO extends CommonEntity {
private List<String> ids;
private String entryFlag;
private String gfsh;
private String companyCode;
public void setParam(Page page) {
if (this.isAll(this.getGfTaxNo())) {

@ -47,6 +47,7 @@ public class TdxCustomsRecordModelDTO extends CommonDTO {
private String rzhBelongDate;
private String gfsh;
private String companyCode;
private String rzlx;
private String rzhType;

@ -76,9 +76,9 @@ public class CustomsSignServiceImpl extends MpBaseServiceImpl<CustomsRecordDao,
public String queryManualSign(Page page, TdxCustomsRecordDTO entity, UserInfo userInfo) throws Exception {
DynamicContextHolder.push(userInfo.getDbName() + DbConstant.BUSINESS_READ);
entity.setParam(page);
if (StringUtils.isEmpty(entity.getGfTaxNo())) {
entity.setBuyTaxNoFromUser(userInfo);
}
// if (StringUtils.isEmpty(entity.getGfTaxNo())) {
// entity.setBuyTaxNoFromUser(userInfo);
// }
ResultData<Object> resultData = new ResultData<>();
JSONObject tabulateMenu = tabulateRedisService.getTabulateMenu(userInfo.getCompany(), entity.getMenuId());
@ -498,17 +498,17 @@ public class CustomsSignServiceImpl extends MpBaseServiceImpl<CustomsRecordDao,
entity.setUserAccount(userInfo.getId());
entity.setParam(page);
List<Business> businessList = userInfo.getBusiness();
if (StringUtils.isEmpty(entity.getGfTaxNo())) {
entity.setBuyTaxNoFromUser(userInfo);
}
// if (StringUtils.isEmpty(entity.getGfTaxNo())) {
// entity.setBuyTaxNoFromUser(userInfo);
// }
ResultData<Object> resultData = new ResultData<>();
JSONObject tabulateMenu = tabulateRedisService.getTabulateMenu(userInfo.getCompany(), entity.getMenuId());
resultData.putTabulateMenu(tabulateMenu);
if (entity.getGfTaxNo() == null && CollectionUtils.isEmpty(entity.getGfTaxNoList())) {
return resultData.getPageData(null).toJsonBase();
}
// if (entity.getGfTaxNo() == null && CollectionUtils.isEmpty(entity.getGfTaxNoList())) {
// return resultData.getPageData(null).toJsonBase();
// }
Page<Map<String, Object>> result = this.baseMapper.querySign(page, entity);
if (ResultData.isEmpty(result)) {

@ -267,21 +267,12 @@
t_dx_customs_record p
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in('0','5','6')
and p.data_type = '17'
and p.export_mark = '0'
and p.data_sources = '0'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'">
and p.bzdh = #{queryParams.bzdh}
@ -372,17 +363,12 @@
t_dx_customs_record p
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in('0','5','6')
and p.data_type = '17'
and p.export_mark = '0'
and p.data_sources = '0'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'">
and p.bzdh = #{queryParams.bzdh}
@ -404,10 +390,6 @@
and p.account_period = #{queryParams.accountPeriod}
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}
</if>
@ -504,18 +486,9 @@
t_dx_customs_record p
where
p.data_type = '17'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.export_mark = '0'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.sfDkStatus!=null and queryParams.sfDkStatus == '0'.toString()">
and (p.auth_status in('0','5','6') or (p.bdk_status = '2' and p.auth_status != '4')) and p.data_sources =
@ -599,19 +572,10 @@
t_dx_customs_record p
where
p.data_type = '17'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.export_mark = '0'
and p.data_sources = '0'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.sfDkStatus!=null and queryParams.sfDkStatus == '0'.toString()">
and (p.auth_status in('0','5','6') or (p.bdk_status = '2' and p.auth_status != '4'))
@ -804,18 +768,10 @@
FROM
t_dx_customs_record t
where t.qs_status = '0'
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and t.export_mark = '0'
and (t.data_sources = '0' or (t.data_sources != '0' and t.collect_upload_status = '2'))
<if test="queryParams.gfTaxNoList!=null and queryParams.gfTaxNoList.size>0">
and t.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNoList" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo!=''">
and t.gf_tax_no = #{queryParams.gfTaxNo}
</if>
<if test="queryParams.fillInDateBegin!=null and queryParams.fillInDateBegin!=''">
and t.fill_in_date &gt;= #{queryParams.fillInDateBegin}
</if>
@ -875,15 +831,10 @@
t_dx_customs_record p
where
p.export_mark = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status != '0'
and p.bdk_status in ('1','2')
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'">
and p.bzdh = #{queryParams.bzdh}
@ -905,10 +856,6 @@
and p.account_period = #{queryParams.accountPeriod}
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}
</if>
@ -1047,19 +994,9 @@
r.comp_code as compCode
FROM
t_dx_customs t left join t_dx_customs_record r on t.customs_code = r.customs_code
where t.user_account = #{queryParams.userAccount}
<if test="queryParams.gfTaxNoList!=null and queryParams.gfTaxNoList.size>0">
and t.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNoList" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo!=''">
and t.gf_tax_no = #{queryParams.gfTaxNo}
</if>
where r.gf_tax_no = #{gfsh}
and (r.comp_code = #{companyCode} or r.comp_code = '' or r.comp_code is null)
t.user_account = #{queryParams.userAccount}
<if test="queryParams.qsDateBegin!=null and queryParams.qsDateBegin!=''">
and t.qs_date &gt;= #{queryParams.qsDateBegin}
</if>
@ -1125,16 +1062,10 @@
t_dx_customs_record p
where
p.export_mark = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status != '0'
and p.bdk_status in ('1','2')
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.bzdh != null and queryParams.bzdh != '' and queryParams.bzdh != 'null'">
and p.bzdh = #{queryParams.bzdh}
</if>
@ -1153,11 +1084,6 @@
<if test="queryParams.accountPeriod != null and queryParams.accountPeriod != '' and queryParams.accountPeriod != 'null' and queryParams.accountPeriod != '99'">
and p.account_period = #{queryParams.accountPeriod}
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}
</if>

@ -2,6 +2,7 @@ package com.dxhy.domestic.controller;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -35,6 +36,9 @@ public class DomesticExportCustomsRzdkController extends AbstractController {
@PostMapping("/querySgByPage")
public ResponseEntity<?> querySgByPage(Page page, @RequestBody TdxExportCustomsModelDTO dto) {
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
return ResponseEntity
.ok(R.ok().put("data", domesticExportCustomsCkService.querySgByPage(page, dto, this.getUserInfo())));
} catch (Exception e) {
@ -77,6 +81,9 @@ public class DomesticExportCustomsRzdkController extends AbstractController {
@PostMapping("/queryRzcxByPage")
public ResponseEntity<?> queryRzcxByPage(Page page, @RequestBody TdxExportCustomsModelDTO dto) {
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
return ResponseEntity
.ok(R.ok().put("data", domesticExportCustomsCkService.queryRzcxByPage(page, dto, this.getUserInfo())));
} catch (Exception e) {

@ -2,6 +2,7 @@ package com.dxhy.domestic.controller;
import javax.annotation.Resource;
import org.apache.commons.lang.StringUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -35,6 +36,9 @@ public class DomesticExportInvoiceRzdkController extends AbstractController {
@PostMapping("/queryVatSgrz")
public ResponseEntity<?> queryVatSgrz(Page page, @RequestBody TdxExportInvoiceModelDTO dto) {
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
return ResponseEntity
.ok(R.ok().put("data", tDxExportInvoiceService.queryVatSgrz(page, dto, this.getUserInfo())));
} catch (Exception e) {

@ -25,6 +25,7 @@ public class TdxExportCustomsModelDTO extends CommonDTO {
private List<String> ids;
private List<String> gfTaxNo;
private String gfsh;
private String companyCode;
private String customsCode;
private String fillInDateStart;
private String fillInDateEnd;

@ -31,6 +31,7 @@ public class TdxExportInvoiceModelDTO extends CommonDTO {
private String invoiceType;
private String invoiceSource;
private String gfsh;
private String companyCode;
private String sfDkStatus;
private String rzhYesorno;
private String bdkStatus;

@ -529,7 +529,7 @@ public class DomesticExportCustomsCkServiceImpl extends ServiceImpl<DomesticExpo
JSONObject tabulateMenu = tabulateRedisService.getTabulateMenu(dto.getCompany(), dto.getMenuId());
resultData.putTabulateMenu(tabulateMenu);
if (StringUtils.isBlank(dto.getGfsh()) && dto.getGfTaxNo().size() <= 0) {
if (StringUtils.isBlank(dto.getGfsh())) {
resultData.setDataList(new ArrayList<>());
return resultData.toJsonBase();
}

@ -69,7 +69,7 @@ public class DomesticExportInvoiceCkServiceImpl extends ServiceImpl<DomesticExpo
JSONObject tabulateMenu = tabulateRedisService.getTabulateMenu(dto.getCompany(), dto.getMenuId());
resultData.putTabulateMenu(tabulateMenu);
if (StringUtils.isBlank(dto.getGfsh()) && dto.getGfTaxNo().size() <= 0) {
if (StringUtils.isBlank(dto.getGfsh())) {
resultData.setDataList(new ArrayList<>());
return resultData.toJsonBase();
}

@ -74,19 +74,10 @@
t_dx_tax_current c on p.gf_tax_no = c.taxno
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in ('0','5','6')
and p.data_type = '17'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}
@ -326,24 +317,8 @@
t_dx_export_customs p
where
p.auth_status !='0'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<!-- <if test="bzdh != null and bzdh != '' and bzdh != 'null'">-->
<!-- and p.bzdh = #{bzdh}-->
<!-- </if>-->
<!-- <if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null'">-->
<!-- and p.inaccount_status = #{inAccountStatus}-->
<!-- </if>-->
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}
@ -439,25 +414,8 @@
t_dx_export_customs p
where
p.auth_status !='0'
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<!-- <if test="bzdh != null and bzdh != '' and bzdh != 'null'">-->
<!-- and p.bzdh = #{bzdh}-->
<!-- </if>-->
<!-- <if test="inAccountStatus != null and inAccountStatus != '' and inAccountStatus != 'null'">-->
<!-- and p.inaccount_status = #{inAccountStatus}-->
<!-- </if>-->
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}

@ -53,20 +53,10 @@
t_dx_export_invoice p
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in('0','5','6')
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.invoiceNo!=null and queryParams.invoiceNo!=''">
and p.invoice_no = #{queryParams.invoiceNo}
</if>
@ -128,20 +118,10 @@
t_dx_export_invoice p
where
p.rzh_yesorno = '0'
and p.gf_tax_no = #{queryParams.gfsh}
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
and p.auth_status in('0','5','6')
and p.company = #{queryParams.company}
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
<if test="queryParams.invoiceNo!=null and queryParams.invoiceNo!=''">
and p.invoice_no = #{queryParams.invoiceNo}
</if>

@ -597,7 +597,19 @@ public class SignFpqsController extends AbstractController {
log.info("签收查询接收到参数: {}",pramsMap);
data.put("userId", getUserId());
data.put("dbName", getUserInfo().getDbName());
data.put("gfsh", pramsMap.get("gfsh"));
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
data.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String companyCode = (String) pramsMap.get("companyCode");
data.put("companyCode",companyCode);
data.put("invoiceNo", pramsMap.get("invoiceNo"));
//全电号码用后8位查询
if(ObjectUtils.isNotEmpty(pramsMap.get("invoiceNo"))&&pramsMap.get("invoiceNo").toString().length()==20){

@ -48,12 +48,11 @@
left join t_dx_record_invoice r on t.uuid=r.uuid
left join t_dx_invoice_img img on t.scan_id = img.scan_id
WHERE t.valid = '1'
and t.gf_tax_no = #{gfsh}
and (r.comp_code = #{companyCode} or r.comp_code = '' or r.comp_code is null)
<if test="qsNameFlag==null">
and t.user_account = #{userId}
</if>
<if test="gfsh != '99' and gfsh != null and gfsh != '' and gfsh != 'null'">
and t.gf_tax_no = #{gfsh}
</if>
<!--
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' ">
and t.invoice_type = #{invoiceType}
@ -189,12 +188,11 @@
FROM t_dx_invoice t
left join t_dx_record_invoice r on t.uuid=r.uuid
WHERE t.valid = '1'
and r.gf_tax_no = #{gfsh}
and (r.comp_code = #{companyCode} or r.comp_code = '' or r.comp_code is null)
<if test="qsNameFlag==null">
and t.user_account = #{userId}
</if>
<if test="gfsh != null and gfsh != '' and gfsh != 'null' and gfsh != '99' ">
and t.gf_tax_no = #{gfsh}
</if>
<!--
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' ">
and t.invoice_type = #{invoiceType}
@ -568,12 +566,11 @@
FROM t_dx_invoice t
left join t_dx_record_invoice r on t.uuid=r.uuid left join t_dx_invoice_img img on t.scan_id = img.scan_id
WHERE t.valid = '1'
and r.gf_tax_no = #{gfsh}
and (r.comp_code = #{companyCode} or r.comp_code = '' or r.comp_code is null)
<if test="qsNameFlag==null">
and t.user_account = #{userId}
</if>
<if test="gfsh != '99' and gfsh != null and gfsh != '' and gfsh != 'null'">
and t.gf_tax_no = #{gfsh}
</if>
<if test="voucherNumber != null and voucherNumber != ''">
and r.voucher_number like concat('%',concat(#{voucherNumber},'%'))
</if>
@ -649,12 +646,11 @@
FROM t_dx_invoice t
left join t_dx_record_invoice r on t.uuid=r.uuid
WHERE t.valid = '1'
and r.gf_tax_no = #{gfsh}
and (r.comp_code = #{companyCode} or r.comp_code = '' or r.comp_code is null)
<if test="qsNameFlag==null">
and t.user_account = #{userId}
</if>
<if test="gfsh != null and gfsh != '' and gfsh != 'null' and gfsh != '99' ">
and t.gf_tax_no = #{gfsh}
</if>
<!--
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' ">
and t.invoice_type = #{invoiceType}

Loading…
Cancel
Save