修改mapper文件

release
yishiqihuasheng 2 years ago
parent f25d2d37c1
commit 2d394e6017
  1. 7
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  2. 16
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml

@ -10,7 +10,9 @@ import javax.annotation.Resource;
import com.dxhy.auth.client.annotation.IgnoreClientToken; import com.dxhy.auth.client.annotation.IgnoreClientToken;
import com.dxhy.auth.client.annotation.IgnoreUserToken; import com.dxhy.auth.client.annotation.IgnoreUserToken;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.vo.TaxOrgCode; import com.dxhy.common.vo.TaxOrgCode;
import com.dxhy.common.vo.UserInfo;
import com.dxhy.extend.entity.PullRecordReq; import com.dxhy.extend.entity.PullRecordReq;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -169,6 +171,11 @@ public class ExtInvoicePoolController extends AbstractController {
pramsMap.put("accountPeriod", accountPeriod); pramsMap.put("accountPeriod", accountPeriod);
log.info("accountPeriod:{}",accountPeriod); log.info("accountPeriod:{}",accountPeriod);
} }
String companyCode = (String) pramsMap.get("companyCode");
if (StringHelper.isNotBlank(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCodes",getUserInfo().getCompanyCodes());
log.info("组织编码===>{}", pramsMap.get("companyCodes"));
}
int curr = (int)pramsMap.get("curr"); int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size"); int size = (int)pramsMap.get("size");
try { try {

@ -317,6 +317,14 @@
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'"> <if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and sn_voucher_number = #{snVoucherNumber} and sn_voucher_number = #{snVoucherNumber}
</if> </if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or comp_code is null or comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'"> <if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and comp_code = #{companyCode} and comp_code = #{companyCode}
</if> </if>
@ -403,6 +411,14 @@
<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 bzdh = #{bzdh} and bzdh = #{bzdh}
</if> </if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode == '99'">
and (comp_code in
<foreach collection="companyCodes" index="index" item="companyCode" separator="," open="(" close=")">
#{companyCode}
</foreach>
or comp_code is null or comp_code = ''
)
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'"> <if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode != '88'">
and comp_code = #{companyCode} and comp_code = #{companyCode}
</if> </if>

Loading…
Cancel
Save