认证查询

release
路明慧 2 years ago
parent 629c462936
commit e05dda1a9e
  1. 19
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  2. 4
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/RzFpxxServiceImpl.java
  3. 11
      dxhy-core/src/main/java/com/dxhy/core/thread/RzFpxxExportThread.java
  4. 26
      dxhy-core/src/main/resources/mapper/FpZhMapper.xml

@ -80,22 +80,7 @@
and t.auth_status in ('2','3','4')
and t.company = #{company}
and t.gf_tax_no = #{gfsh}
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or t.comp_code is null or t.comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
and t.comp_code = #{companyCode}
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>
@ -367,7 +352,7 @@
from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and t.comp_code = #{companyCode}
and t.invoice_type in('01','03','08','14','31','283','161','183','185')
and t.auth_status in ('2','3','4')
and t.bdk_status in ('1','2')

@ -239,9 +239,9 @@ public class RzFpxxServiceImpl extends MpBaseServiceImpl<FpxxZhDao, FpRzRespVO>
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {
List<String> gfshList = (List<String>)pramsMap.get("gfsh");
String gfsh = (String) pramsMap.get("gfsh");
String inAccountStatus = (String)pramsMap.get("inAccountStatus");
if (gfshList.size() == 0) {
if (StringUtils.isNotBlank(gfsh)) {
// 未从getUserInfo()获取到购方税号信息
json.put("hjsl", "0");
json.put("hjje", "0");

@ -180,16 +180,6 @@ public class RzFpxxExportThread extends BaseThread {
pramsMap.put("taxRate", taxRate);
pramsMap.put("companyCodes",companyCodes);
if (StringHelper.isBlank(gfsh)){
pramsMap.put("sign","88");
}
List<String> gfshList = new ArrayList<>();
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);
pramsMap.put("gfsh", gfshList);
} else {
pramsMap.put("gfsh", gfshList);
}
// pramsMap.put("kpksrq", DateUtils.getMorning(DateUtils.strToDate(kpksrq)));
pramsMap.put("kpksrq", kpksrq);
// pramsMap.put("kpjsrq", DateUtils.getNight(DateUtils.strToDate(kpjsrq)));
@ -269,6 +259,7 @@ public class RzFpxxExportThread extends BaseThread {
}
}
pramsMap.put("companyCode",companyCode);
pramsMap.put("gfsh",gfsh);
pramsMap.put("inAccountStatus", inAccountStatus);
pramsMap.put("company", company);
pramsMap.put("qsr", prams.getString("qsr"));

@ -105,33 +105,13 @@
t.export_mark,t.inaccount_status,t.payment_status,DATE_FORMAT(t.payment_date,'%Y-%m-%d')payment_date,t.voucher_number,t.tax_rate
from t_dx_record_invoice t
WHERE t.invoice_date between #{kpksrq} and #{kpjsrq}
and (t.invoice_type in('01','03','08','14','31','283','161','183','185') or (t.invoice_type ='32' and t.lq_tdyslxDm='08'))
and t.invoice_type in ('01','03','08','14','31','283','161','183','185')
and t.bdk_status in ('1','2')
and t.export_mark = '0'
and t.auth_status in ('2','3','4')
and t.company = #{company}
<if test="sign !='88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or t.comp_code is null or t.comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '99' and companyCode != '88' and companyCode != '' and companyCode != 'null'" >
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode == '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
and t.gf_tax_no = #{gfsh}
and t.comp_code = #{companyCode}
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}

Loading…
Cancel
Save