购方税号和组织编码修改

release
yishiqihuasheng 2 years ago
parent 7df8de574a
commit 3a11c26358
  1. 30
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceOutController.java
  2. 2
      dxhy-base/src/main/java/com/dxhy/base/model/BaseInvoiceReqVO.java
  3. 2
      dxhy-base/src/main/java/com/dxhy/base/model/BaseReceiptOutReqVO.java
  4. 8
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptInvoiceServiceImpl.java
  5. 18
      dxhy-base/src/main/java/com/dxhy/base/service/receipt/BaseReceiptOutServiceImpl.java
  6. 9
      dxhy-base/src/main/resources/mapper/BaseInvoiceOutMapper.xml
  7. 16
      dxhy-customs/src/main/java/com/dxhy/customs/controller/CustomsJkszhcxController.java
  8. 2
      dxhy-customs/src/main/java/com/dxhy/customs/service/impl/CustomsCustomsJkszhcxServiceImpl.java
  9. 7
      dxhy-customs/src/main/resources/mapper/CustomsJkszhcxMapper.xml
  10. 7
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/controller/DomesticInvoiceExportCountController.java
  11. 2
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/count/impl/DomesticCustomsExportCountServiceImpl.java
  12. 2
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/service/count/impl/DomesticInvoiceExportCountServiceImpl.java
  13. 11
      dxhy-export-domestic/src/main/resources/mapper/DomesticExportCustomsMapper.xml
  14. 11
      dxhy-export-domestic/src/main/resources/mapper/DomesticExportInvoiceMapper.xml
  15. 10
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtCautionController.java
  16. 24
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtCustomsController.java
  17. 102
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  18. 17
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtReportController.java
  19. 25
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtTicketController.java
  20. 2
      dxhy-extend/src/main/java/com/dxhy/extend/model/ExtCautionAbnormalReqVO.java
  21. 8
      dxhy-extend/src/main/java/com/dxhy/extend/service/caution/ExtCautionExpirationServiceImpl.java
  22. 5
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  23. 41
      dxhy-extend/src/main/resources/mapper/CustomsMapper.xml
  24. 136
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml
  25. 12
      dxhy-extend/src/main/resources/mapper/ExtQstjbMapper.xml
  26. 43
      dxhy-extend/src/main/resources/mapper/TicketMapper.xml

@ -59,14 +59,10 @@ public class BaseInvoiceOutController extends AbstractController {
@SysLog("调用进项税转出列表接口")
public ResponseEntity<R> listReceipt(@RequestBody BaseInvoiceReqVO reqVO) {
try {
reqVO.setUserInfo(getUserInfo());
if ("99".equals(reqVO.getGfsh()) || StringUtils.isBlank(reqVO.getGfsh())) {
List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
log.debug("gfshAll : " + gfshAll);
if (gfshAll.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", "datalist:[]"));
}
if(StringUtils.isBlank(reqVO.getGfsh())||StringUtils.isBlank(reqVO.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
reqVO.setUserInfo(getUserInfo());
return ResponseEntity.ok(R.ok().put("data", baseIReceiptInvoiceService.listReceipt(reqVO)));
} catch (Exception e) {
e.printStackTrace();
@ -84,14 +80,10 @@ public class BaseInvoiceOutController extends AbstractController {
@PostMapping(value = "list/listOutReceipt")
public ResponseEntity<R> listOutReceipt(@RequestBody BaseReceiptOutReqVO reqVO) {
try {
reqVO.setUserInfo(getUserInfo());
if ("99".equals(reqVO.getGfsh()) || StringUtils.isBlank(reqVO.getGfsh())) {
List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
log.debug("gfshAll : " + gfshAll);
if (gfshAll.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", "datalist:[]"));
}
if (StringUtils.isBlank(reqVO.getGfsh()) || StringUtils.isBlank(reqVO.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
reqVO.setUserInfo(getUserInfo());
return ResponseEntity.ok(R.ok().put("data", baseIReceiptOutService.listOutReceipt(reqVO)));
} catch (Exception e) {
e.printStackTrace();
@ -156,14 +148,10 @@ public class BaseInvoiceOutController extends AbstractController {
@PostMapping(value = "list/listCancelReceipt")
public ResponseEntity<R> listCancelReceipt(@RequestBody BaseReceiptOutReqVO reqVO) {
try {
reqVO.setUserInfo(getUserInfo());
if ("99".equals(reqVO.getGfsh()) || StringUtils.isBlank(reqVO.getGfsh())) {
List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
log.debug("gfshAll : " + gfshAll);
if (gfshAll.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", "datalist:[]"));
}
if (StringUtils.isBlank(reqVO.getGfsh())||StringUtils.isBlank(reqVO.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
reqVO.setUserInfo(getUserInfo());
return ResponseEntity.ok(R.ok().put("data", baseIReceiptOutService.listCancelReceipt(reqVO)));
} catch (Exception e) {
e.printStackTrace();

@ -25,6 +25,8 @@ public class BaseInvoiceReqVO extends BaseBaseReqVO {
*/
private String sellerName;
private String companyCode;
/**
* 认证开始时间
*/

@ -19,6 +19,8 @@ public class BaseReceiptOutReqVO extends BaseBaseReqVO {
*/
private String gfsh;
private String companyCode;
/**
* 销方名称
*/

@ -154,12 +154,8 @@ public class BaseReceiptInvoiceServiceImpl extends MpBaseServiceImpl<BaseTDxReco
queryEntity.setRzhYesorno(RzztEnum.YRZ.getRzztDm());
queryEntity.setCompany(reqVO.getCompany());
// 购方税号
if (!StringHelper.isBlank(reqVO.getGfsh()) && !"99".equals(reqVO.getGfsh())) {
queryEntity.setGfTaxNo(reqVO.getGfsh());
} else {
List<String> allTaxNo = UserInfoUtil.getGfshAll(reqVO.getUserInfo().getOrg());
queryWrapper.in(BaseTDxRecordInvoice::getGfTaxNo, allTaxNo);
}
queryWrapper.eq(BaseTDxRecordInvoice::getGfTaxNo,reqVO.getGfsh());
queryWrapper.eq(BaseTDxRecordInvoice::getCompCode,reqVO.getCompanyCode());
// 发票号码
if (!StringHelper.isBlank(reqVO.getInvoiceNo())) {
queryEntity.setInvoiceNo(reqVO.getInvoiceNo());

@ -94,13 +94,8 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
filter.put("cancelStatus", JxszcCancelEnum.WQX.getQxztDm());
// 购方税号
List<String> allTaxNo = new ArrayList<>();
if (StringHelper.isBlank(reqVO.getGfsh()) || "99".equals(reqVO.getGfsh())) {
allTaxNo = UserInfoUtil.getGfshAll(reqVO.getUserInfo().getOrg());
} else {
allTaxNo.add(reqVO.getGfsh());
}
filter.put("gfshList", allTaxNo);
filter.put("gfsh",reqVO.getGfsh());
filter.put("companyCode", reqVO.getCompanyCode());
// 销方名称
filter.put("sellerName", StringHelper.isBlank(reqVO.getSellerName()) ? null : reqVO.getSellerName());
@ -574,13 +569,8 @@ public class BaseReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutD
filter.put("orderByClause", "out_date desc,invoice_date desc");
// 购方税号
List<String> allTaxNo = new ArrayList<>();
if (StringHelper.isBlank(reqVO.getGfsh()) || "99".equals(reqVO.getGfsh())) {
allTaxNo = UserInfoUtil.getGfshAll(reqVO.getUserInfo().getOrg());
} else {
allTaxNo.add(reqVO.getGfsh());
}
filter.put("gfshList", allTaxNo);
filter.put("gfsh",reqVO.getGfsh());
filter.put("companyCode",reqVO.getCompanyCode());
// 销方名称
filter.put("sellerName", StringHelper.isBlank(reqVO.getSellerName()) ? null : reqVO.getSellerName());

@ -55,15 +55,8 @@
</sql>
<sql id="common_query_condition">
<if test="gfsh != null">
and b.gf_tax_no = #{gfsh}
</if>
<if test="gfshList != null and gfshList.size()>0">
and b.gf_tax_no in
<foreach collection="gfshList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
and (b.comp_code = #{companyCode} or b.comp_code = '' or b.comp_code is null)
<if test="sellerName != null">
and b.xf_name LIKE CONCAT( #{sellerName}, '%')
</if>

@ -54,13 +54,17 @@ public class CustomsJkszhcxController extends AbstractController {
public Object listFpzhcx(@RequestBody Map<String, Object> pramsMap) {
pramsMap.put("business", getUserInfo().getBusiness());
pramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
pramsMap.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
pramsMap.put("gfsh", gfshList);
String companyCode = (String) pramsMap.get("companyCode");
pramsMap.put("companyCode",companyCode);
if (pramsMap.get("fillInStartDate") != null && !"".equals(pramsMap.get("fillInStartDate"))) {
pramsMap.put("fillInStartDate",
DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("fillInStartDate").toString())));

@ -80,7 +80,7 @@ public class CustomsCustomsJkszhcxServiceImpl extends MpBaseServiceImpl<CustomsJ
tabulateRedisService.getTabulateMenu(pramsMap.get("company").toString(), pramsMap.get("menuId").toString());
try {
if (CollectionUtils.isEmpty((List<String>)pramsMap.get("gfsh"))) {
if (StringUtils.isBlank((String) pramsMap.get("gfsh"))) {
json.put("total", "0");
json.put("datalist", new ArrayList<>());
return super.responseResult(json);

@ -214,10 +214,9 @@
count(1) hjsl,
sum(t.tax_amount) hjse
from t_dx_customs_record t
where export_mark = '0' and t.gf_tax_no in
<foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
where export_mark = '0'
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="customsCode != null and customsCode != '' and customsCode != 'null'">
and t.customs_code = #{customsCode}
</if>

@ -4,6 +4,7 @@ import java.util.Objects;
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -44,6 +45,9 @@ public class DomesticInvoiceExportCountController extends AbstractController {
log.info("传入参数dto {}",dto);
log.info("传入参数page {}",page);
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
dto.setUserInfo(getUserInfo());
return ResponseEntity
.ok(R.ok().put("data", domesticInvoiceExportCountService.queryExportInvoiceList(page, dto)));
@ -58,6 +62,9 @@ public class DomesticInvoiceExportCountController extends AbstractController {
@ApiOperation(value = "转内销缴款书查询")
public ResponseEntity<R> queryExportCustomsList(Page<Object> page, @RequestBody TdxExportCustomsModelDTO dto) {
try {
if (StringUtils.isBlank(dto.getGfsh())||StringUtils.isBlank(dto.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
dto.setUserInfo(getUserInfo());
return ResponseEntity.ok(Objects
.requireNonNull(R.ok().put("data", icustomsExportCountService.queryExportCustomsList(page, dto))));

@ -51,7 +51,7 @@ public class DomesticCustomsExportCountServiceImpl extends MpBaseServiceImpl<Dom
resultData.putTabulateMenu(tabulateMenu);
if (StringUtils.isBlank(dto.getGfsh()) && dto.getGfTaxNo().size() <= 0) {
if (StringUtils.isBlank(dto.getGfsh())) {
resultData.setDataList(new ArrayList<>());
return resultData.toJsonBase();
}

@ -57,7 +57,7 @@ public class DomesticInvoiceExportCountServiceImpl extends MpBaseServiceImpl<Dom
JSONObject tabulateMenu = tabulateRedisService.getTabulateMenu(dto.getCompany(), dto.getMenuId());
resultData.putTabulateMenu(tabulateMenu);
if (org.apache.commons.lang.StringUtils.isBlank(dto.getGfsh()) && dto.getGfTaxNo().size() <= 0) {
if (org.apache.commons.lang.StringUtils.isBlank(dto.getGfsh())) {
resultData.setDataList(new ArrayList<>());
return resultData.toJsonBase();
}

@ -991,17 +991,8 @@
</sql>
<sql id="queryExportCustoms_sql">
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
<if test="queryParams.customsCode!=null and queryParams.customsCode!=''">
and p.customs_code = #{queryParams.customsCode}

@ -1059,17 +1059,8 @@
</sql>
<sql id="queryExportInvoice_sql">
<if test="queryParams.gfTaxNo!=null and queryParams.gfTaxNo.size>0">
and p.gf_tax_no in
<foreach close=")" collection="queryParams.gfTaxNo" index="index" item="item" open="("
separator=",">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="queryParams.gfsh!=null and queryParams.gfsh!=''">
and p.gf_tax_no = #{queryParams.gfsh}
</if>
and (p.comp_code = #{queryParams.companyCode} or p.comp_code = '' or p.comp_code is null)
<if test="queryParams.rzhYesorno != null and queryParams.rzhYesorno != '' and queryParams.rzhYesorno != '3'.toString()">
and p.rzh_yesorno = #{queryParams.rzhYesorno}

@ -77,14 +77,10 @@ public class ExtCautionController extends AbstractController {
@SysLog("异常发票预警列表查询")
public ResponseEntity<R> listAnomalyInvoice(@RequestBody ExtCautionAbnormalReqVO reqVO) {
try {
reqVO.setUserInfo(getUserInfo());
if ("99".equals(reqVO.getGfsh()) || StringUtils.isBlank(reqVO.getGfsh())) {
List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
log.debug("gfshAll : " + gfshAll);
if (gfshAll.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", "datalist:[]"));
}
if (StringUtils.isBlank(reqVO.getGfsh())||StringUtils.isBlank(reqVO.getCompanyCode())){
return ResponseEntity.ok(R.error(CommonConstants.GFSH_OR_COMPANYCODE_MISS));
}
reqVO.setUserInfo(getUserInfo());
return ResponseEntity.ok(R.ok().put("data", cautionExpirationService.listAnomalyInvoice(reqVO)));
} catch (Exception e) {
e.printStackTrace();

@ -48,13 +48,20 @@ public class ExtCustomsController extends AbstractController {
public Object listFpzhcx(@RequestBody Map<String, Object> pramsMap) {
pramsMap.put("business", getUserInfo().getBusiness());
pramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
pramsMap.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
pramsMap.put("gfsh", gfshList);
String companyCode = (String) pramsMap.get("companyCode");
pramsMap.put("companyCode",companyCode);
if (pramsMap.get("fillInStartDate") != null && !"".equals(pramsMap.get("fillInStartDate"))) {
pramsMap.put("fillInStartDate",
DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("fillInStartDate").toString())));
@ -144,11 +151,6 @@ 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);

@ -56,25 +56,18 @@ public class ExtInvoicePoolController extends AbstractController {
public ResponseEntity<R> listAddTaxInvoice(@RequestBody Map<String, Object> pramsMap) {
pramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
// gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
String gfsh = (String) pramsMap.get("gfsh");
pramsMap.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
// if (gfshList.size() == 0) {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
pramsMap.put("gfsh", gfshList);
String companyCode = (String) pramsMap.get("companyCode");
pramsMap.put("companyCode",companyCode);
if (pramsMap.get("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
}
@ -108,24 +101,6 @@ public class ExtInvoicePoolController extends AbstractController {
}
int curr = (int)pramsMap.get("curr");
int size = (int)pramsMap.get("size");
List<String> companyCodes = new ArrayList<>();
String companyCode = (String) pramsMap.get("companyCode");
if(StringUtils.isNotEmpty(companyCode) && !"99".equals(companyCode) && !"88".equals(companyCode)) {
pramsMap.put("companyCode", companyCode);
companyCodes.add(companyCode);
// gfshList = extInvoicePoolService.getGfshList(gfshList,companyCodes);
pramsMap.put("gfsh", gfshList);
}else if(StringUtils.isNotEmpty(companyCode) && "99".equals(companyCode)){
pramsMap.put("companyCode", companyCode);
companyCodes = getUserInfo().getCompanyCodes();
pramsMap.put("companyCodes", companyCodes);
// gfshList = extInvoicePoolService.getGfshList(gfshList,companyCodes);
pramsMap.put("gfsh", gfshList);
log.info("组织机构====>{}", companyCodes);
}else if(StringUtils.isNotEmpty(companyCode) && "88".equals(companyCode)){
pramsMap.put("companyCode", companyCode);
log.info("组织机构====>{}", companyCodes);
}
try {
return ResponseEntity.ok(R.ok().put("data", extInvoicePoolService.listAddTax(pramsMap, curr, size)));
@ -169,17 +144,20 @@ public class ExtInvoicePoolController extends AbstractController {
pramsMap.put("dbName", getUserInfo().getDbName());
log.info("其他发票采集接收参数 {}",pramsMap);
List<String> gfshList = new ArrayList<>();
List<String> invoiceTypeList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
pramsMap.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
pramsMap.put("gfsh", gfshList);
String companyCode = (String) pramsMap.get("companyCode");
pramsMap.put("companyCode",companyCode);
List<String> invoiceTypeList = new ArrayList<>();
if (pramsMap.get("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
}
@ -200,11 +178,6 @@ public class ExtInvoicePoolController extends AbstractController {
pramsMap.put("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 size = (int)pramsMap.get("size");
try {
@ -229,26 +202,17 @@ public class ExtInvoicePoolController extends AbstractController {
public ResponseEntity<R> listSaleInvoice(@RequestBody Map<String, Object> pramsMap) {
pramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
pramsMap.put("gfsh", gfsh);
// gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
// if (gfshList.size() == 0) {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
pramsMap.put("taxno", gfshList);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
String companyCode = (String) pramsMap.get("companyCode");
pramsMap.put("companyCode",companyCode);
if (pramsMap.get("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
}
@ -276,10 +240,6 @@ 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());
}
try {
return ResponseEntity.ok(Objects
.requireNonNull(R.ok().put("data", extInvoicePoolService.listSaleInvoice(pramsMap, curr, size))));

@ -364,16 +364,17 @@ public class ExtReportController extends AbstractController {
data.put("dbName", getUserInfo().getDbName());
data.put("business", getUserInfo().getBusiness());
data.put("businessCode", pramsMap.get("businessCode"));
List<String> gfshList = new ArrayList<>();
if (!"99".equals(pramsMap.get("gfsh")) && pramsMap.get("gfsh") != null && !"".equals(pramsMap.get("gfsh"))) {
gfshList.add(pramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
if(pramsMap.get("gfsh") == null || "".equals(pramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) pramsMap.get("gfsh");
data.put("gfsh", gfsh);
if (pramsMap.get("companyCode") == null || "".equals(pramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
data.put("gfsh", gfshList);
String companyCode = (String) pramsMap.get("companyCode");
data.put("companyCode",companyCode);
if (pramsMap.get("qsfs") != null && !"".equals(pramsMap.get("qsfs")) && !"99".equals(pramsMap.get("qsfs"))) {
data.put("qsfs", pramsMap.get("qsfs"));

@ -51,17 +51,18 @@ public class ExtTicketController extends AbstractController {
log.info("传入参数为:{}",paramsMap);
paramsMap.put("dbName", getUserInfo().getDbName());
List<String> gfshList = new ArrayList<>();
List<String> invoiceTypeList = new ArrayList<>();
if (!"99".equals(paramsMap.get("gfsh")) && paramsMap.get("gfsh") != null && !"".equals(paramsMap.get("gfsh"))) {
gfshList.add(paramsMap.get("gfsh").toString());
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
if(paramsMap.get("gfsh") == null || "".equals(paramsMap.get("gfsh"))){
return ResponseEntity.ok(R.error("购方税号不能为空"));
}
String gfsh = (String) paramsMap.get("gfsh");
paramsMap.put("gfsh", gfsh);
if (paramsMap.get("companyCode") == null || "".equals(paramsMap.get("companyCode"))){
return ResponseEntity.ok(R.error("组织编码不能为空"));
}
paramsMap.put("gfsh",gfshList);
String companyCode = (String) paramsMap.get("companyCode");
paramsMap.put("companyCode",companyCode);
List<String> invoiceTypeList = new ArrayList<>();
if (paramsMap.get("invoiceType") != null && !"".equals(paramsMap.get("invoiceType"))
&& !"99".equals(paramsMap.get("invoiceType"))) {
String[] invoiceTypeArr = paramsMap.get("invoiceType").toString().split(",");
@ -70,7 +71,6 @@ public class ExtTicketController extends AbstractController {
paramsMap.put("list", invoiceTypeList);
}
}
paramsMap.put("gfsh", gfshList);
if (paramsMap.get("kpksrq") != null && !"".equals(paramsMap.get("kpksrq"))) {
paramsMap.put("kpksrq", DateUtils.getMorning(DateUtils.strToDate(paramsMap.get("kpksrq").toString())));
}
@ -109,11 +109,6 @@ 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) {

@ -20,6 +20,8 @@ public class ExtCautionAbnormalReqVO extends ExtBaseReqVO {
* 购方税号
*/
private String gfsh;
private String companyCode;
/**
* 发票号码
*/

@ -212,12 +212,8 @@ public class ExtCautionExpirationServiceImpl extends MpBaseServiceImpl<ExtTdxRec
.ne(ExtTdxRecordInvoice::getInvoiceStatus, FpztEnum.ZC.getFpztDm());
// 购方税号
if (StringUtils.isNotBlank(reqVO.getGfsh()) && !"99".equals(reqVO.getGfsh())) {
queryWrapper.lambda().eq(ExtTdxRecordInvoice::getGfTaxNo, reqVO.getGfsh());
} else {
List<String> allTaxNo = UserInfoUtil.getGfshAll(reqVO.getUserInfo().getOrg());
queryWrapper.lambda().in(ExtTdxRecordInvoice::getGfTaxNo, allTaxNo);
}
queryWrapper.eq("gf_tax_no",reqVO.getGfsh());
queryWrapper.eq("comp_code",reqVO.getCompanyCode());
// 发票号码
if (StringUtils.isNotBlank(reqVO.getInvoiceNo())) {
queryWrapper.lambda().eq(ExtTdxRecordInvoice::getInvoiceNo, reqVO.getInvoiceNo());

@ -296,11 +296,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
pageList.get(i).setInAccountStatus("未入账");
}
// log.info("inAccountStatus=====>{}",pageList.get(i).getInAccountStatus());
// pageList.get(i).setInAccountStatus(dictdetaServcice.queryDictName(DictConstant.INACCOUNT_STATUS,
// pageList.get(i).getInAccountStatus()));
}
}

@ -52,10 +52,9 @@
data_sources,t.image_id,t.posting_time,t.account_period,t.comp_code,t.bzdh
from t_dx_customs_record t
where export_mark = '0'
<!-- and t.gf_tax_no in-->
<!-- <foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="keyWord != null and keyWord != '' and keyWord != 'null'">
and t.customs_code like CONCAT('%',#{keyWord},'%')
</if>
@ -150,20 +149,6 @@
<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>
<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>
order by t.fill_in_date desc
</select>
@ -174,10 +159,8 @@
sum(t.tax_amount) hjse
from t_dx_customs_record t
where export_mark = '0'
<!-- and t.gf_tax_no in-->
<!-- <foreach close=")" collection="gfsh" index="index" item="item" open="(" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="keyWord != null and keyWord != '' and keyWord != 'null'">
and t.customs_code like CONCAT('%',#{keyWord},'%')
</if>
@ -272,20 +255,6 @@
<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>
<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>

@ -57,7 +57,8 @@
resultMap="InvoicePoolHjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_record_invoice t
where 1=1
where t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND t.create_date BETWEEN #{cjksyf} and #{cjjsyf}
</if>
@ -69,12 +70,6 @@
like
CONCAT('%',#{keyWord},'%')
</if>
<if test="companyCode != '88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
@ -142,20 +137,6 @@
<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>
</select>
<select id="listAddTaxInvoice" parameterType="java.util.Map"
resultType="com.dxhy.extend.entity.ExtAddTaxInvoice" databaseId="mysql">
@ -208,7 +189,8 @@
t.collect_from collectFrom,
t.comp_code compCode
from t_dx_record_invoice t
where 1 = 1
where t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND t.create_date BETWEEN #{cjksyf} and #{cjjsyf}
</if>
@ -220,12 +202,6 @@
like
CONCAT('%',#{keyWord},'%')
</if>
<if test="companyCode != '88'">
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
and t.invoice_type = #{invoiceType}
@ -293,23 +269,6 @@
<if test="invoiceSource!=null and invoiceSource!='' and invoiceSource!='99'">
and t.invoice_source = #{invoiceSource}
</if>
<!-- <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>
</select>
<!--其他发票汇总-->
<select id="selectOtherHj" parameterType="java.util.Map"
@ -322,6 +281,8 @@
t_dx_invoice_reimburse
where invoice_type in
('91','94','95','00','97','98','101','102','103','99')
and gf_tax_no = #{gfsh}
and (comp_code = #{companyCode} or comp_code = '' or comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND create_date between #{cjksyf} and #{cjjsyf}
</if>
@ -331,10 +292,6 @@
<if test="keyWord != null and keyWord != '' and keyWord != 'null' ">
AND CONCAT(IFNULL(invoice_code,''),IFNULL(invoice_no,'')) like CONCAT('%',#{keyWord},'%')
</if>
<!-- AND gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '999' ">
AND invoice_type = #{invoiceType}
@ -375,20 +332,6 @@
<if test="snVoucherNumber != null and snVoucherNumber != '' and snVoucherNumber != 'null' and snVoucherNumber != '99'">
and sn_voucher_number = #{snVoucherNumber}
</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'">
and comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (comp_code is null or comp_code = '')
</if>
GROUP BY uuid having min(create_date) ) t
</select>
<select id="listOtherInvoice" parameterType="java.util.Map"
@ -420,13 +363,11 @@
t_dx_invoice_reimburse
where invoice_type in
('91','94','95','00','97','98','101','102','103','99')
and gf_tax_no = #{gfsh}
and (comp_code = #{companyCode} or comp_code = '' or comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND create_date between #{cjksyf} and #{cjjsyf}
</if>
<!-- AND gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="kpksrq != null and kpksrq!= '' and kpjsrq != null and kpjsrq != ''">
AND invoice_date between #{kpksrq} and #{kpjsrq}
</if>
@ -476,20 +417,6 @@
<if test="bzr != null and bzr != '' and bzr != 'null'">
and bzr like concat('%',#{bzr},'%')
</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'">
and comp_code = #{companyCode}
</if>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (comp_code is null or comp_code = '')
</if>
GROUP BY uuid having min(create_date)
ORDER BY create_date DESC
</select>
@ -498,7 +425,8 @@
resultMap="InvoicePoolHjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_sale_record_invoice t
where 1 = 1
where t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND t.create_date between #{cjksyf} and #{cjjsyf}
</if>
@ -510,12 +438,6 @@
like
CONCAT('%',#{keyWord},'%')
</if>
<if test="sign != '88'">
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
@ -581,20 +503,6 @@
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</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 id="listSaleInvoice" parameterType="java.util.Map"
@ -612,7 +520,8 @@
,t.bzr bzr
,t.comp_code compCode
from t_dx_sale_record_invoice t
where 1 = 1
where t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND t.create_date between #{cjksyf} and #{cjjsyf}
</if>
@ -624,12 +533,6 @@
like
CONCAT('%',#{keyWord},'%')
</if>
<if test="sign != '88'">
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if
test="invoiceType != null and invoiceType != '' and invoiceType != 'null' and invoiceType != '99' ">
@ -700,21 +603,6 @@
<if test="bzr != null and bzr != '' and bzr != 'null'">
and t.bzr like concat('%',#{bzr},'%')
</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
ORDER BY t.create_date DESC
</select>
<!--摊销记录查询-->

@ -244,14 +244,12 @@
select COUNT(1)hjsl, SUM(t.invoice_amount)hjje, SUM(t.tax_amount)hjse
from t_dx_record_invoice t
where t.qs_status = '1'
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and t.rzh_yesorno = '0'
and t.invoice_type in ('01','03','08','14')
and t.company = #{company}
and t.qs_date between #{qsrqq} and #{qsrqz}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' ">
and t.qs_type = #{qsfs}
@ -339,14 +337,12 @@
,t.sn_voucher_number,t.posting_time,t.image_id,t.account_period,t.bzdh,t.bzr,t.inaccount_status,t.comp_code
from t_dx_record_invoice t
where t.qs_status = '1'
and t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
and t.rzh_yesorno = '0'
and t.invoice_type in ('01','03','08','14','31')
and t.company = #{company}
and t.qs_date between #{qsrqq} and #{qsrqz}
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="qsfs != null and qsfs != '' and qsfs != 'null' ">
and t.qs_type = #{qsfs}

@ -12,7 +12,8 @@
resultMap="InvoicePoolHjResultMap" databaseId="mysql">
select count(1) hjsl,sum(t.invoice_amount)hjje,sum(t.tax_amount)hjse
from t_dx_invoice_reimburse t
where 1=1
where t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if
test="kpksrq != null and kpksrq != '' and kpksrq != 'null' and kpjsrq != null and kpjsrq != '' and kpjsrq != 'null'">
@ -26,10 +27,6 @@
and CONCAT(IFNULL(t.passenger,''),IFNULL(t.passenger_s_f_z_h,'')) like
CONCAT('%',#{keyWord},'%')
</if>
<!-- and t.gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="list != null and list != '' and list != 'null' ">
and t.invoice_type in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
@ -78,20 +75,6 @@
<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>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code is null or t.comp_code = '')
</if>
</select>
@ -99,7 +82,8 @@
resultType="com.dxhy.extend.entity.ExtTicketInvoiceModel" databaseId="mysql">
select *
from t_dx_invoice_reimburse t
where 1=1
where t.gf_tax_no = #{gfsh}
and (t.comp_code = #{companyCode} or t.comp_code = '' or t.comp_code is null)
<if test="kpksrq != null and kpksrq != '' and kpksrq != 'null' and kpjsrq != null and kpjsrq != '' and kpjsrq != 'null'">
and t.invoice_date between #{kpksrq} and #{kpjsrq}
</if>
@ -110,10 +94,6 @@
and CONCAT(IFNULL(t.passenger,''),IFNULL(t.passenger_s_f_z_h,'')) like
CONCAT('%',#{keyWord},'%')
</if>
<!-- and t.gf_tax_no in-->
<!-- <foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<if test="list != null and list != '' and list != 'null' ">
and t.invoice_type in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
@ -162,19 +142,6 @@
<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>
<if test="companyCode != null and companyCode != '' and companyCode != 'null' and companyCode != '99' and companyCode == '88'">
and (t.comp_code is null or t.comp_code = '')
</if>
</select>
</mapper>

Loading…
Cancel
Save