Merge remote-tracking branch 'origin/0803-add_column' into 0803-add_column

release
yishiqihuasheng 2 years ago
commit 0fcb7b288a
  1. 13
      dxhy-core/src/main/java/com/dxhy/core/controller/ExcelController.java
  2. 8
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/ExportCautionServiceImpl.java
  3. 9
      dxhy-core/src/main/java/com/dxhy/core/thread/CustomExportThread.java
  4. 2
      dxhy-core/src/main/java/com/dxhy/core/thread/FpmxExportThread.java
  5. 1
      dxhy-core/src/main/java/com/dxhy/core/thread/QypcsmkpExportThread.java
  6. 3
      dxhy-core/src/main/resources/mapper/BbfpmxMapper.xml
  7. 7
      dxhy-core/src/main/resources/mapper/CustomsMapper.xml
  8. 2
      dxhy-core/src/main/resources/mapper/QsxxMapper.xml
  9. 18
      dxhy-core/src/main/resources/mapper/TDxCustomsRecordMapper.xml
  10. 13
      dxhy-core/src/main/resources/mapper/TicketMapper.xml
  11. 7
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  12. 7
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java
  13. 2
      dxhy-extend/src/main/java/com/dxhy/extend/service/caution/ExtCautionExpirationServiceImpl.java
  14. 2
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml
  15. 5
      dxhy-extend/src/main/resources/mapper/TicketMapper.xml

@ -231,18 +231,7 @@ public class ExcelController extends AbstractController {
String newCondition = prams.toString();
pramsMap.put("conditions", newCondition);
} else {
String gfmc = "";
List<Tax> org = getUserInfo().getOrg();
if (org != null && org.size() > 0) {
for (Tax tax : org) {
if (tax.getTaxno().equals(gfsh)) {
gfmc = tax.getTaxname();
}
}
}
prams.put("gfmc", gfmc);
String newCondition = prams.toString();
pramsMap.put("conditions", newCondition);
prams.put("gfsh", gfsh);
}
} else {
pramsMap.put("conditions", condition);

@ -79,12 +79,10 @@ public class ExportCautionServiceImpl extends MpBaseServiceImpl<TDxRecordInvoice
// 认证状态为未认证
.eq(TDxRecordInvoice::getRzhYesorno, RzztEnum.WRZ.getRzztDm())
// 发票状态为异常的发票
.in(TDxRecordInvoice::getInvoiceStatus, FpztEnum.YC.getFpztDm(), FpztEnum.ZF.getFpztDm(),
FpztEnum.HC.getFpztDm(), FpztEnum.SK.getFpztDm());
.ne(TDxRecordInvoice::getInvoiceStatus, FpztEnum.ZC.getFpztDm());
// 购方税号
if (reqVO.getAllTaxNo().size() > 0) {
queryWrapper.lambda().in(TDxRecordInvoice::getGfTaxNo, reqVO.getAllTaxNo());
}
queryWrapper.eq("gf_tax_no",reqVO.getGfsh());
queryWrapper.eq("comp_code",reqVO.getCompanyCode());
// 发票号码
if (!StringHelper.isBlank(reqVO.getInvoiceNo())) {
queryWrapper.lambda().eq(TDxRecordInvoice::getInvoiceNo, reqVO.getInvoiceNo());

@ -176,15 +176,8 @@ public class CustomExportThread extends BaseThread {
pramsMap.put("imageNumber",imageNumber);
pramsMap.put("postingTimeEnd",postingTimeEnd);
pramsMap.put("postingTimeStart",postingTimeStart);
pramsMap.put("gfsh", gfsh);
List<String> gfshList = new ArrayList<>();
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);
pramsMap.put("gfsh", gfshList);
} else {
pramsMap.put("gfsh", gfshList);
}
if (!StringHelper.isBlank(customsCode)) {
pramsMap.put("customsCode", customsCode);
}

@ -104,6 +104,7 @@ public class FpmxExportThread extends BaseThread {
// 应该保存的参数
JSONObject prams = JSONObject.parseObject(condition);
String gfsh = prams.getString("gfsh");
String companyCode = prams.getString("companyCode");
String xfmc = prams.getString("xfmc");
String invoiceType = prams.getString("invoiceType");
String kpksrq = prams.getString("kpksrq");
@ -125,6 +126,7 @@ public class FpmxExportThread extends BaseThread {
pramsMap.put("gfsh", gfshList);
}
pramsMap.put("xfmc", xfmc);
pramsMap.put("companyCode", companyCode);
if (!StringHelper.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {
pramsMap.put("invoiceType", invoiceType);

@ -124,6 +124,7 @@ public class QypcsmkpExportThread extends BaseThread {
prams.put("companyCodes",companyCodes);
String gfTaxNo = prams.getString("gfTaxNo");
String gfsh = prams.getString("gfsh");
prams.put("gfsh", gfsh);
List<String> gfshList = new ArrayList<>();
if (!StringHelper.isBlank(gfsh)) {
gfshList = StringHelper.stringToList(gfsh);

@ -61,6 +61,9 @@
<if test="invoiceSource != null and invoiceSource != '' and invoiceSource != 'null' and invoiceSource != '99' ">
and t.invoice_source = #{invoiceSource}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null'">
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
</if>
order by t.invoice_date desc
</select>

@ -50,10 +50,7 @@
data_sources
from t_dx_customs_record t
where export_mark = '0'
<!-- and t.gf_tax_no in-->
<!-- <foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
and t.gf_tax_no = #{gfsh}
<if test="keyWord != null and keyWord != '' and keyWord != 'null'">
and t.customs_code like CONCAT('%',#{keyWord},'%')
</if>
@ -149,7 +146,7 @@
and t.account_period = #{accountPeriod}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and (t.comp_code = #{companyCode} and t.comp_code = '' or t.comp_code is null)
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
</if>
order by t.fill_in_date desc
</select>

@ -31,7 +31,7 @@
t.id,t.notes,t.qs_type,t.gf_name,t.xf_name,t.qs_status,t.qs_date,t.user_name,t.invoice_code,t.invoice_no
,t.ele_invoice_no,t.invoice_type,t.uuid,t.invoice_date,t.invoice_amount,t.tax_amount,t.dept_id,t.dept_name
,t.scan_id,t.remark,t.gf_tax_no,t.xf_tax_no,t.create_date,t.total_amount,t.voucher_number,r.sn_voucher_number,r.posting_time,r.image_id,r.account_period,r.bzdh,bzr,r.inaccount_status,r.comp_code
from t_dx_invoice t inner join t_dx_record_invoice r on t.uuid = r.uuid
from t_dx_invoice t left join t_dx_record_invoice r on t.uuid = r.uuid
WHERE t.valid = '1'
<if test="qsNameFlag == null">
and t.user_account = #{userid}

@ -437,14 +437,14 @@
p.cxrz_status as cxrzStatus,
p.bdk_status as bdkStatus,
p.dept_name as businessName,
t.sn_voucher_number as snVoucherNumber,
t.posting_time as postingTime,
t.image_id as imageId,
t.account_period as account_period,
t.bzdh,
t.bzr,
t.inaccount_status as inaccountStatus,
t.comp_code as compCode
p.sn_voucher_number as snVoucherNumber,
p.posting_time as postingTime,
p.image_id as imageId,
p.account_period as account_period,
p.bzdh,
p.bzr,
p.inaccount_status as inaccountStatus,
p.comp_code as compCode
FROM
t_dx_customs_record p
where
@ -1034,7 +1034,7 @@
t_dx_customs t inner join t_dx_customs_record r on t.customs_code = r.customs_code
where t.user_account = #{queryParams.userAccount}
<if test="gfsh!=null">
and t.gf_tax_no =#{gfsh}
and t.gf_tax_no =#{queryParams.gfsh}
</if>
<if test="companyCode!=null">
and t.comp_code =#{companyCode}

@ -113,19 +113,8 @@
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and t.sn_voucher_number = #{snVoucherNumber}
</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 != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and t.comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code is null or t.comp_code = '')
and (t.comp_code = #{companyCode} or t.comp_code is null or t.comp_code = '')
</if>
</select>

@ -25,6 +25,7 @@ import com.dxhy.erp.utils.HmacSHA1Util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.*;
@ -927,7 +928,7 @@ public class SDNYMainProcessController extends AbstractController {
log.error("发票同步接口记录保存失败,errormsg:{}",e);
}
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)));
return ResponseEntity.status(HttpStatus.GATEWAY_TIMEOUT).body(JSONObject.toJSONString(R.error(CommonConstants.CONNECT_TIMEOUT)));
} catch(NullPointerException exception){
log.error("同步SAP失败,报错信息为:{}", exception);
exception.printStackTrace();
@ -940,7 +941,7 @@ public class SDNYMainProcessController extends AbstractController {
log.error("发票同步接口记录保存失败,errormsg:{}",e);
}
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)));
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(JSONObject.toJSONString(R.error(CommonConstants.NULL_POINTER_TIMEOUT)));
} catch(Exception exception){
log.error("同步SAP失败,报错信息为:{}", exception);
exception.printStackTrace();
@ -953,7 +954,7 @@ public class SDNYMainProcessController extends AbstractController {
log.error("发票同步接口记录保存失败,errormsg:{}",e);
}
return ResponseEntity.ok(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)));
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(JSONObject.toJSONString(R.error(CommonConstants.MSG_ERR_DEFAULT)));
}
}

@ -770,7 +770,12 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
reimburse.setInvoiceType(fplxdm);
reimburse.setInvoiceCode(invoice.getInvoiceCode());
reimburse.setInvoiceNo(invoice.getInvoiceNumber());
reimburse.setInvoiceDate(invoice.getBillingDate());
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = formatter.format(new Date());
reimburse.setInvoiceDate(StringUtils.isEmpty(invoice.getBillingDate()) ? dateString : invoice.getBillingDate());
reimburse.setPassenger(invoice.getRiderName());
if (invoice.getTotalAmount() != null) {
reimburse.setInvoiceAmount(new BigDecimal(invoice.getTotalAmount()));

@ -213,7 +213,7 @@ public class ExtCautionExpirationServiceImpl extends MpBaseServiceImpl<ExtTdxRec
// 购方税号
queryWrapper.eq("gf_tax_no",reqVO.getGfsh());
queryWrapper.eq("comp_code",reqVO.getCompanyCode());
queryWrapper.eq("comp_code",reqVO.getCompanyCode()).or().eq("comp_code","").or().isNull("comp_code");
// 发票号码
if (StringUtils.isNotBlank(reqVO.getInvoiceNo())) {
queryWrapper.lambda().eq(ExtTdxRecordInvoice::getInvoiceNo, reqVO.getInvoiceNo());

@ -281,7 +281,6 @@
t_dx_invoice_reimburse
where invoice_type in
('91','94','95','00','97','98','101','102','103','99')
and gf_tax_no = #{gfsh}
and (comp_code = #{companyCode} or comp_code = '' or comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND create_date between #{cjksyf} and #{cjjsyf}
@ -363,7 +362,6 @@
t_dx_invoice_reimburse
where invoice_type in
('91','94','95','00','97','98','101','102','103','99')
and gf_tax_no = #{gfsh}
and (comp_code = #{companyCode} or comp_code = '' or comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND create_date between #{cjksyf} and #{cjjsyf}

@ -12,9 +12,8 @@
resultMap="InvoicePoolHjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_invoice_reimburse t
where t.gf_tax_no = #{gfsh}
where 1=1
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if
test="kpksrq != null and kpksrq != '' and kpksrq != 'null' and kpjsrq != null and kpjsrq != '' and kpjsrq != 'null'">
and t.invoice_date between #{kpksrq} and #{kpjsrq}
@ -82,7 +81,7 @@
resultType="com.dxhy.extend.entity.ExtTicketInvoiceModel" databaseId="mysql">
select *
from t_dx_invoice_reimburse t
where t.gf_tax_no = #{gfsh}
where 1=1
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="kpksrq != null and kpksrq != '' and kpksrq != 'null' and kpjsrq != null and kpjsrq != '' and kpjsrq != 'null'">
and t.invoice_date between #{kpksrq} and #{kpjsrq}

Loading…
Cancel
Save