修改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); pramsMap.put("gfsh", gfshList);
//所属组织 //所属组织
List<String> companyCodeList = new ArrayList<>(); // List<String> companyCodeList = new ArrayList<>();
if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){ // if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){
companyCodeList.add(companyCode); // companyCodeList.add(companyCode);
}else { // }else {
companyCodeList = getUserInfo().getCompanyCodes(); // companyCodeList = getUserInfo().getCompanyCodes();
log.info("获取到的组织信息{}",companyCodeList); // log.info("获取到的组织信息{}",companyCodeList);
// }
if (StringUtils.isNotBlank(companyCode)){
pramsMap.put("companyCodes",companyCode);
} }
pramsMap.put("companyCodes",companyCodeList);
if (!StringUtils.isBlank(invoiceType)) { if (!StringUtils.isBlank(invoiceType)) {
if (!"99".equals(invoiceType)) { if (!"99".equals(invoiceType)) {

@ -82,12 +82,14 @@
<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="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} and t.comp_code = #{companyCodes}
</if> </if>
<if test="companyCodes != null and companyCodes != '' and companyCodes = '88'"> <if test="companyCodes != null and companyCodes != '' and companyCodes = '88'">
and (t.comp_code = '' or t.comp_code is null) and (t.comp_code = '' or t.comp_code is null)
</if> </if>
<if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' "> <if test="invoiceStatus != null and invoiceStatus != '' and invoiceStatus != 'null' ">
and t.invoice_status = #{invoiceStatus} and t.invoice_status = #{invoiceStatus}
</if> </if>
@ -341,7 +343,7 @@
<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="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} and t.comp_code = #{companyCodes}
</if> </if>
<if test="companyCodes != null and companyCodes != '' and companyCodes = '88'"> <if test="companyCodes != null and companyCodes != '' and companyCodes = '88'">

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

Loading…
Cancel
Save