修改mapper文件

release
yishiqihuasheng 2 years ago
parent 5e78a2e4d1
commit 0e492682cf
  1. 17
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 6
      dxhy-base/src/main/resources/mapper/BaseFpZhMapper.xml
  3. 28
      dxhy-base/src/main/resources/mapper/BaseSggxcxMapper.xml

@ -535,15 +535,18 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("gfsh", gfshList);
//所属组织
List<String> companyCodeList = new ArrayList<>();
if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){
companyCodeList.add(companyCode);
}else {
companyCodeList = getUserInfo().getCompanyCodes();
log.info("获取到的组织信息{}",companyCodeList);
// List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){
// companyCodeList.add(companyCode);
// }else {
// companyCodeList = getUserInfo().getCompanyCodes();
// log.info("获取到的组织信息{}",companyCodeList);
// }
if (StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCodes",companyCode);
}
pramsMap.put("companyCodes",companyCodeList);
if (!StringUtils.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) {

@ -82,12 +82,14 @@
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88 and companyCodes != '' and companyCodes != 'null'" >
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" >
and t.comp_code = #{companyCodes}
</if>
<if test="companyCodes != null and companyCodes != '' and companyCodes = '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus}
</if>
@ -341,7 +343,7 @@
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88 and companyCodes != '' and companyCodes != 'null'" >
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" >
and t.comp_code = #{companyCodes}
</if>
<if test="companyCodes != null and companyCodes != '' and companyCodes = '88'">

@ -93,10 +93,16 @@
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">
#{companyCode}
</foreach>
<!-- and t.comp_code in-->
<!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">-->
<!-- #{companyCode}-->
<!-- </foreach>-->
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" >
and t.comp_code = #{companyCodes}
</if>
<if test="companyCodes != null and companyCodes != '' and companyCodes = '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>
@ -388,10 +394,16 @@
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and t.comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">
#{companyCode}
</foreach>
<!-- and t.comp_code in-->
<!-- <foreach collection="companyCodes" index="index" item="companyCode" open="(" close=")" separator=",">-->
<!-- #{companyCode}-->
<!-- </foreach>-->
<if test="companyCodes != null and companyCodes != '99' and companyCodes != '88' and companyCodes != '' and companyCodes != 'null'" >
and t.comp_code = #{companyCodes}
</if>
<if test="companyCodes != null and companyCodes != '' and companyCodes = '88'">
and (t.comp_code = '' or t.comp_code is null)
</if>
<if test="qszt != null and qszt != '' and qszt != 'null' ">
and t.qs_status = #{qszt}
</if>

Loading…
Cancel
Save