Merge branches '0531L' and 'test' of http://192.168.12.182/invoice/pt into test

release
yishiqihuasheng 2 years ago
commit bcc8af0864
  1. 34
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 24
      dxhy-core/src/main/java/com/dxhy/core/thread/PoolAddTaxThread.java
  3. 23
      dxhy-core/src/main/java/com/dxhy/core/thread/PoolSaleThread.java
  4. 48
      dxhy-core/src/main/resources/mapper/ExtPaperMapper.xml
  5. 2
      dxhy-erp/src/main/java/com/dxhy/erp/model/ZDATA.java
  6. 32
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java
  7. 39
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtInvoicePoolController.java
  8. 44
      dxhy-extend/src/main/resources/mapper/ExtInvoicePoolMapper.xml

@ -199,6 +199,13 @@ public class BaseInvoiceController extends AbstractController {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
}
pramsMap.put("gfsh", gfshList);
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
//所属组织
// List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode)){
@ -566,6 +573,14 @@ public class BaseInvoiceController extends AbstractController {
}
pramsMap.put("gfsh", gfshList);
boolean flag = checkList(gfshList);
log.info("gfshList.size(){}",gfshList.size());
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
//所属组织
// List<String> companyCodeList = new ArrayList<>();
// if (StringUtils.isNotBlank(companyCode) && !"99".equals(companyCode)){
@ -675,6 +690,25 @@ public class BaseInvoiceController extends AbstractController {
}
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
/**
* 智能勾选查询 qsfs 默认传9
*

@ -181,6 +181,12 @@ public class PoolAddTaxThread extends BaseThread {
} else {
pramsMap.put("gfsh", gfshList);
}
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
if (cjksyf != null && !"".equals(cjksyf)) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(cjksyf)));
}
@ -468,4 +474,22 @@ public class PoolAddTaxThread extends BaseThread {
return filePath.toString();
}
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
}

@ -186,6 +186,11 @@ public class PoolSaleThread extends BaseThread {
} else {
pramsMap.put("gfsh", gfshList);
}
boolean flag = checkList(gfshList);
if (flag){
pramsMap.put("sign","88");
log.info("登陆账号无税号");
}
if (cjksyf != null && !"".equals(cjksyf)) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(cjksyf)));
}
@ -468,4 +473,22 @@ public class PoolSaleThread extends BaseThread {
return filePath.toString();
}
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
}

@ -293,10 +293,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '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}
</if>
@ -400,10 +403,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '88'">
and t.xf_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}
</if>
@ -547,7 +553,7 @@
from
${dxhyTertiary}.t_dx_record_invoice t
left JOIN ${dxhyDetail}.t_dx_record_invoice_detail b ON t.uuid = b.uuid
where t.detail_yesorno = '1'
where '1' = '1'
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND t.create_date BETWEEN #{cjksyf} and #{cjjsyf}
</if>
@ -559,10 +565,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '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}
</if>
@ -657,7 +666,7 @@
from
${dxhyTertiary}.t_dx_sale_record_invoice t
left JOIN ${dxhyDetail}.t_dx_record_invoice_detail_sales b ON t.uuid = b.uuid
where t.detail_yesorno = '1'
where 1 = 1
<if test="cjksyf != null and cjksyf!= '' and cjjsyf != null and cjjsyf != ''">
AND t.create_date between #{cjksyf} and #{cjjsyf}
</if>
@ -669,10 +678,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '88'">
and t.xf_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}
</if>

@ -36,4 +36,6 @@ public class ZDATA {
private String BELNR;
@JsonProperty(value = "BUDAT")
private String BUDAT;
@JsonProperty(value = "XXBS")
private String XXBS;
}

@ -19,6 +19,7 @@ import com.dxhy.erp.model.auth.InterfaceCode;
import com.dxhy.erp.service.InvoiceAuthService;
import com.dxhy.erp.service.TDxInvoiceReimburseService;
import com.dxhy.erp.utils.CheckUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
@ -34,6 +35,7 @@ import java.util.*;
*/
@SuppressWarnings({"AlibabaMethodTooLong", "AlibabaUndefineMagicConstant"})
@Service
@Slf4j
public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, RecordInvoice>
implements InvoiceAuthService {
@ -362,8 +364,11 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
//成功或者失败标识
boolean flag = false;
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM();
//销项标识
String xxbs = zdata1.getXXBS();
log.info("xxbs==>{}",xxbs);
DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ);
if(fplxList.contains(zdata1.getZFPLX())){
if(fplxList.contains(zdata1.getZFPLX()) && !"X".equals(xxbs)){
TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid);
if(recordInvoiceByUuid!=null){
UpdateWrapper updateWrapper = new UpdateWrapper();
@ -419,17 +424,20 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE);
tDxInvoiceReimburseService.getBaseMapper().update(null,updateWrapper);
}
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE);
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.set("sn_voucher_number",zdata1.getBELNR());
updateWrapper.set("posting_time",zdata1.getBUDAT());
updateWrapper.set("account_period",zdata1.getBUDAT().substring(0,7));
updateWrapper.set("bzdh",zdata1.getZBZDH());
updateWrapper.set("inaccount_status",zdata1.getZYWZT());
updateWrapper.set("comp_code",zdata1.getZGSDM());
updateWrapper.set("bzr",zdata1.getZJBRT());
updateWrapper.eq("uuid",uuid);
tdxSaleRecordInvoiceDao.update(null,updateWrapper);
if ("X".equals(xxbs)){
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE);
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.set("sn_voucher_number",zdata1.getBELNR());
updateWrapper.set("posting_time",zdata1.getBUDAT());
updateWrapper.set("account_period",zdata1.getBUDAT().substring(0,7));
updateWrapper.set("bzdh",zdata1.getZBZDH());
updateWrapper.set("inaccount_status",zdata1.getZYWZT());
updateWrapper.set("comp_code",zdata1.getZGSDM());
updateWrapper.set("bzr",zdata1.getZJBRT());
updateWrapper.eq("uuid",uuid);
tdxSaleRecordInvoiceDao.update(null,updateWrapper);
}
if(!flag){
promsg.append("票据号码:"+zdata1.getZFPHM()+"绑定成功! ");
}

@ -66,9 +66,14 @@ public class ExtInvoicePoolController extends AbstractController {
// }
// }
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
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("gfsh", gfshList);
if (pramsMap.get("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
@ -219,10 +224,16 @@ public class ExtInvoicePoolController extends AbstractController {
// return ResponseEntity.ok(R.ok().put("data", ""));
// }
// }
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() == 0) {
return ResponseEntity.ok(R.ok().put("data", ""));
}
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("cjksyf") != null && !"".equals(pramsMap.get("cjksyf"))) {
pramsMap.put("cjksyf", DateUtils.getMorning(DateUtils.strToDate(pramsMap.get("cjksyf").toString())));
@ -327,4 +338,22 @@ public class ExtInvoicePoolController extends AbstractController {
System.out.println(replace);
}
}
public boolean checkList(List<String> list) {
boolean flag =false;
if (list == null || list.isEmpty()){
flag = true;
}else {
String s = list.toString().replace("[","").replace("]","");
if (StringHelper.isBlank(s)){
flag = true;
}
if (StringHelper.isNotBlank(s) && s.contains(",")){
String replace = s.replace(",", "");
if (StringHelper.isBlank(replace)){
flag = true;
}
}
}
return flag;
}
}

@ -69,10 +69,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '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}
</if>
@ -218,10 +221,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.gf_tax_no in
<foreach collection="gfsh" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<if test="sign != '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}
</if>
@ -506,10 +512,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<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' ">
and t.invoice_type = #{invoiceType}
@ -617,10 +626,13 @@
like
CONCAT('%',#{keyWord},'%')
</if>
and t.xf_tax_no in
<foreach collection="taxno" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<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' ">
and t.invoice_type = #{invoiceType}

Loading…
Cancel
Save