修改mapper文件

release
yishiqihuasheng 2 years ago
parent 2d394e6017
commit ba60c22279
  1. 6
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtCustomsController.java
  2. 5
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  3. 6
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtTicketController.java
  4. 4
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  5. 16
      dxhy-extend/src/main/resources/mapper/CustomsMapper.xml
  6. 31
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml
  7. 16
      dxhy-extend/src/main/resources/mapper/TicketMapper.xml

@ -3,6 +3,7 @@ package com.dxhy.extend.controller;
import com.dxhy.common.aspect.SysLog;
import com.dxhy.common.constant.CommonConstants;
import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.DateUtils;
import com.dxhy.common.utils.R;
@ -143,6 +144,11 @@ public class ExtCustomsController extends AbstractController {
pramsMap.put("postingTimeEnd",
DateUtils.getNight(DateUtils.strToDate(pramsMap.get("postingTimeEnd").toString())));
}
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织编码为====>{}",pramsMap.get("companyCodes"));
}
log.info("请求列表的参数为:{}",pramsMap);

@ -98,6 +98,11 @@ public class ExtInvoicePoolController extends AbstractController {
}
int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size");
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织机构====>{}",pramsMap.get("companyCodes"));
}
try {
return ResponseEntity.ok(R.ok().put("data", extInvoicePoolService.listAddTax(pramsMap, curr, size)));
} catch (Exception e) {

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.dxhy.common.aspect.SysLog;
import com.dxhy.common.constant.CommonConstants;
import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.DateUtils;
import com.dxhy.common.utils.R;
@ -108,6 +109,11 @@ public class ExtTicketController extends AbstractController {
}
int curr = (int)paramsMap.get("curr");
int size = (int)paramsMap.get("size");
String companyCode = (String) paramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
paramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织编码======>{}",paramsMap.get("companyCodes"));
}
try {
return ResponseEntity.ok(R.ok().put("data", ticketService.queryList(paramsMap, curr, size)));
} catch (Exception e) {

@ -49,13 +49,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "销方名称", "销方税号", "金额", "税额", "有效税额",
"价税合计", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间", "采集来源", "签收方式", "签收状态", "签收日期", "签收人",
"入账月份", "凭证号", "过账时间", "影像号", "账期","是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","报账单号","入账状态"};
"入账月份", "凭证号", "过账时间", "影像号", "账期","是否末次摊销", "摊销金额", "剩余金额", "业务单号", "入池时间","报账单号","入账状态","所属组织"};
String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate",
"xfmc", "xfsh", "invoiceAmount", "taxAmount", "yxse", "totalAmount", "rzzt", "rzlx", "rzrq", "rzfs",
"rzr", "collectStatus", "collectDate", "collectFrom", "qsfs", "qszt", "qsrq", "qsr", "inAccountMonth",
"snVoucherNumber","postingTime","imageNumber","accountPeriod", "amortizeStatus", "amortizeAmount", "remainAmortizeAmount",
"documentNumber", "createDate","bzdh","inAccountStatus"};
"documentNumber", "createDate","bzdh","inAccountStatus","compCode"};
// 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size);

@ -148,6 +148,14 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</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>
@ -259,6 +267,14 @@
<if test="accountPeriod != null and accountPeriod != '' and accountPeriod != 'null' and accountPeriod != '99'">
and t.account_period = #{accountPeriod}
</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>

@ -130,6 +130,20 @@
<if test="invoiceSource!=null and invoiceSource!='' and invoiceSource!='99'">
and t.invoice_source = #{invoiceSource}
</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 = '' or t.comp_code is null)
</if>
and t.invoice_type not in ('91','95','97','99','101','00')
</select>
<select id="listAddTaxInvoice" parameterType="java.util.Map"
@ -179,7 +193,8 @@
t.bzdh bzdh,
t.posting_time postingTime,
DATE_FORMAT(t.collect_date,'%Y-%m-%d') collectDate,
t.collect_from collectFrom
t.collect_from collectFrom,
t.comp_code compCode
from t_dx_record_invoice t
where 1 = 1
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
@ -257,6 +272,20 @@
<!-- <if test="snVoucherNumber !=null and snVoucherNumber !='' 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 = '' or t.comp_code is null)
</if>
and t.invoice_type not in ('91','95','97','99','101','00')
</select>
<!--其他发票汇总-->

@ -72,6 +72,14 @@
<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>
@ -142,6 +150,14 @@
<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>

Loading…
Cancel
Save