修改mapper文件

release
yishiqihuasheng 2 years ago
parent ba60c22279
commit d52e6e075d
  1. 4
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  2. 4
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  3. 61
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml

@ -242,6 +242,10 @@ public class ExtInvoicePoolController extends AbstractController {
} }
int curr = (int)pramsMap.get("curr"); int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size"); int size = (int)pramsMap.get("size");
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
}
try { try {
return ResponseEntity.ok(Objects return ResponseEntity.ok(Objects
.requireNonNull(R.ok().put("data", extInvoicePoolService.listSaleInvoice(pramsMap, curr, size)))); .requireNonNull(R.ok().put("data", extInvoicePoolService.listSaleInvoice(pramsMap, curr, size))));

@ -310,13 +310,13 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
try { try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "购方名称", "购方税号", "金额", "税额", "价税合计", String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "购方名称", "购方税号", "金额", "税额", "价税合计",
"清单标志", "备注", "优惠政策类型", "采集状态", "采集时间", "采集来源", "签收方式", "对接系统", "签收状态", "签收日期", "签收人", "入账月份", "清单标志", "备注", "优惠政策类型", "采集状态", "采集时间", "采集来源", "签收方式", "对接系统", "签收状态", "签收日期", "签收人", "入账月份",
"凭证号", "业务单号", "入池时间","影像号","账期","过账日期","报账单号","入账状态"}; "凭证号", "业务单号", "入池时间","影像号","账期","过账日期","报账单号","入账状态","所属组织"};
String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate", String[] titleprop = {"xh", "invoiceType", "invoiceCode", "invoiceNo", "invoiceStatus", "invoiceDate",
"gfmc", "gfsh", "invoiceAmount", "taxAmount", "totalAmount", "listStatus", "remark", "incentiveFlag", "gfmc", "gfsh", "invoiceAmount", "taxAmount", "totalAmount", "listStatus", "remark", "incentiveFlag",
"collectStatus", "collectDate", "collectFrom", "qsfs", "systemName", "qszt", "qsrq", "qsr", "collectStatus", "collectDate", "collectFrom", "qsfs", "systemName", "qszt", "qsrq", "qsr",
"inAccountMonth", "snVoucherNumber", "documentNumber", "createDate","imageNumber","accountPeriod" "inAccountMonth", "snVoucherNumber", "documentNumber", "createDate","imageNumber","accountPeriod"
,"postingTime","bzdh","inAccountStatus"}; ,"postingTime","bzdh","inAccountStatus","compCode"};
// 需要设置返回列表标题时调用 // 需要设置返回列表标题时调用
json = super.setTitleList(titlelist, titleprop); json = super.setTitleList(titlelist, titleprop);
PageHelper.startPage(curr, size); PageHelper.startPage(curr, size);

@ -69,10 +69,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.gf_tax_no in <!-- and t.gf_tax_no in-->
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
#{item} <!-- #{item}-->
</foreach> <!-- </foreach>-->
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>
@ -208,10 +208,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.gf_tax_no in <!-- and t.gf_tax_no in-->
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")"> <!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
#{item} <!-- #{item}-->
</foreach> <!-- </foreach>-->
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> <if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
</if> </if>
@ -474,10 +474,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.xf_tax_no in <!-- and t.xf_tax_no in-->
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")"> <!-- <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">-->
#{item} <!-- #{item}-->
</foreach> <!-- </foreach>-->
<if <if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
@ -539,6 +539,20 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'"> <if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh} and t.bzdh = #{bzdh}
</if> </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>
</select> </select>
<!--销项票池查询--> <!--销项票池查询-->
<select id="listSaleInvoice" parameterType="java.util.Map" <select id="listSaleInvoice" parameterType="java.util.Map"
@ -553,6 +567,7 @@
,t.posting_time postingTime ,t.posting_time postingTime
,t.inaccount_status inAccountStatus ,t.inaccount_status inAccountStatus
,t.bzdh bzdh ,t.bzdh bzdh
,t.comp_code compCode
from t_dx_sale_record_invoice t from t_dx_sale_record_invoice t
where 1 = 1 where 1 = 1
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''"> <if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
@ -566,10 +581,10 @@
like like
CONCAT('%',#{keyWord},'%') CONCAT('%',#{keyWord},'%')
</if> </if>
and t.xf_tax_no in <!-- and t.xf_tax_no in-->
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")"> <!-- <foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">-->
#{item} <!-- #{item}-->
</foreach> <!-- </foreach>-->
<if <if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' "> test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType} and t.invoice_type = #{invoiceType}
@ -633,6 +648,20 @@
<if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'"> <if test="bzdh != null and bzdh != '' and bzdh != 'null' and badh != '99'">
and t.bzdh = #{bzdh} and t.bzdh = #{bzdh}
</if> </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>
GROUP BY t.uuid GROUP BY t.uuid
ORDER BY t.create_date DESC ORDER BY t.create_date DESC
</select> </select>

Loading…
Cancel
Save