diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java b/dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java index a578f25a..132100a7 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/controller/InterfaceController.java @@ -45,6 +45,7 @@ import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; /** * @author jiaohongyang @@ -1290,9 +1291,10 @@ public class InterfaceController extends AbstractController { es.setBSKEY(erpInvoiceData.getIS_INPUT().getBSKEY()); es.setZTYPE("S"); es.setZMESSAGE("处理成功"); + invoices = invoices.stream().filter(e->!"0".equals(e.getRzhYesorno())).collect(Collectors.toList()); if(CollectionUtils.isEmpty(invoices)){ es.setZTYPE("E"); - es.setZMESSAGE("底账数据不存在"); + es.setZMESSAGE("底账数据不存在可转出发票"); outPut.setES_OUTPUT(es); try { diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java index 11c80b9e..9ba13a1f 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java @@ -22,6 +22,7 @@ import com.dxhy.erp.service.InvoiceAuthService; import com.dxhy.erp.service.TDxInvoiceReimburseService; import com.dxhy.erp.utils.CheckUtils; import com.dxhy.erp.utils.DateUtil; +import com.google.common.collect.Lists; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; @@ -346,11 +347,14 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl exitList = Lists.newArrayList(); + List notExit = Lists.newArrayList(); for (ZDATA zdata1 : zdata) { log.info("zdata1.getZFPHM()===>{}", zdata1.getZFPHM()); String collect = fplxList.stream().collect(Collectors.joining(",")); if (!collect.contains(convertFpzldm(zdata1.getZFPLX()))) { log.info("非增值税先不处理:{}", JSON.toJSONString(zdata1)); + exitList.add(zdata1); continue; } String fphm = zdata1.getZFPHM(); @@ -369,16 +373,18 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl 1) { - es.setZMESSAGE(errorMsg.toString() + "不存在"); + if (exitList.size() ==0) { + es.setZMESSAGE(errorMsg.append("发票号码").append(notExit).toString() + "不存在"); es.setZTYPE("E"); return es; } - log.info("zdata={}",zdata); - for (ZDATA zdata1 : zdata) { + log.info("exitList={}",exitList); + for (ZDATA zdata1 : exitList) { //成功或者失败标识 boolean flag = false; log.info("zdata1.getZFPHM():{}", zdata1.getZFPHM()); @@ -441,9 +447,16 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl0){ + es.setZTYPE("E"); + errorMsg.append("发票号码:").append(notExit).append("不存在,其余成功"); + es.setZMESSAGE(errorMsg.toString()); + }else { + es.setZMESSAGE("处理成功"); zdataresp.setPROMSG(promsg.toString()); zdataresp.setPROTYP("S"); - es.setZMESSAGE("处理成功"); es.setZdata(zdataresp); } return es; diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java index c401c8c6..4d37947c 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java @@ -62,6 +62,7 @@ public class ReceiptOutServiceImpl extends MpBaseServiceImpl !"0".equals(e.getRzhYesorno())).collect(Collectors.toList()); // second:根据uuids查询出转出明细并转为map,key=uuid ,value=转出明细 List outs = listByUuids(ids); Map outMap =