修改FI847和FI849

release
yishiqihuasheng 2 years ago
parent 5eef9609a1
commit 7403e85f44
  1. 37
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java
  2. 1
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java

@ -22,6 +22,7 @@ import com.dxhy.erp.service.InvoiceAuthService;
import com.dxhy.erp.service.TDxInvoiceReimburseService; import com.dxhy.erp.service.TDxInvoiceReimburseService;
import com.dxhy.erp.utils.CheckUtils; import com.dxhy.erp.utils.CheckUtils;
import com.dxhy.erp.utils.DateUtil; import com.dxhy.erp.utils.DateUtil;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -346,11 +347,14 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
fplxList.add("14"); fplxList.add("14");
fplxList.add("31"); fplxList.add("31");
fplxList.add("32"); fplxList.add("32");
List<ZDATA> exitList = Lists.newArrayList();
List<String> notExit = Lists.newArrayList();
for (ZDATA zdata1 : zdata) { for (ZDATA zdata1 : zdata) {
log.info("zdata1.getZFPHM()===>{}", zdata1.getZFPHM()); log.info("zdata1.getZFPHM()===>{}", zdata1.getZFPHM());
String collect = fplxList.stream().collect(Collectors.joining(",")); String collect = fplxList.stream().collect(Collectors.joining(","));
if (!collect.contains(convertFpzldm(zdata1.getZFPLX()))) { if (!collect.contains(convertFpzldm(zdata1.getZFPLX()))) {
log.info("非增值税先不处理:{}", JSON.toJSONString(zdata1)); log.info("非增值税先不处理:{}", JSON.toJSONString(zdata1));
exitList.add(zdata1);
continue; continue;
} }
String fphm = zdata1.getZFPHM(); String fphm = zdata1.getZFPHM();
@ -369,16 +373,18 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
//没法区分来源是不是销项发票 //没法区分来源是不是销项发票
TdxSaleRecordInvoice tdxSaleRecordInvoice = tdxSaleRecordInvoiceDao.selectByUuid(uuid); TdxSaleRecordInvoice tdxSaleRecordInvoice = tdxSaleRecordInvoiceDao.selectByUuid(uuid);
if (recordInvoiceByUuid == null && tDxInvoiceReimburse == null && tdxSaleRecordInvoice == null) { if (recordInvoiceByUuid == null && tDxInvoiceReimburse == null && tdxSaleRecordInvoice == null) {
errorMsg.append("发票号码:" + zdata1.getZFPHM()); notExit.add(zdata1.getZFPHM());
continue;
} }
exitList.add(zdata1);
} }
if (errorMsg.length() > 1) { // if (errorMsg.length() > 1) {
es.setZMESSAGE(errorMsg.toString() + "不存在"); // es.setZMESSAGE(errorMsg.toString() + "不存在");
es.setZTYPE("E"); // es.setZTYPE("E");
return es; // return es;
} // }
log.info("zdata={}",zdata); log.info("exitList={}",exitList);
for (ZDATA zdata1 : zdata) { for (ZDATA zdata1 : exitList) {
//成功或者失败标识 //成功或者失败标识
boolean flag = false; boolean flag = false;
log.info("zdata1.getZFPHM():{}", zdata1.getZFPHM()); log.info("zdata1.getZFPHM():{}", zdata1.getZFPHM());
@ -441,10 +447,17 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
UpdateWrapper updateWrapper = convertRecordInvoice(zdata1,uuid); UpdateWrapper updateWrapper = convertRecordInvoice(zdata1,uuid);
tdxSaleRecordInvoiceDao.update(null,updateWrapper); tdxSaleRecordInvoiceDao.update(null,updateWrapper);
} }
zdataresp.setPROMSG(promsg.toString()); //判断是否有底账库不存在发票
zdataresp.setPROTYP("S"); if(notExit.size()>0){
es.setZMESSAGE("处理成功"); es.setZTYPE("E");
es.setZdata(zdataresp); errorMsg.append("发票号码:").append(notExit).append("不存在,其余成功");
es.setZMESSAGE(errorMsg.toString());
}else {
es.setZMESSAGE("处理成功");
zdataresp.setPROMSG(promsg.toString());
zdataresp.setPROTYP("S");
es.setZdata(zdataresp);
}
} }
return es; return es;
} }

@ -62,6 +62,7 @@ public class ReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutDao,
outPut.setES_OUTPUT(es); outPut.setES_OUTPUT(es);
return JsonUtils.getInstance().toJsonString(outPut); return JsonUtils.getInstance().toJsonString(outPut);
} }
invoices = invoices.stream().filter(e -> "0".equals(e.getRzhYesorno())).collect(Collectors.toList());
// second:根据uuids查询出转出明细并转为map,key=uuid ,value=转出明细 // second:根据uuids查询出转出明细并转为map,key=uuid ,value=转出明细
List<BaseTDxRecordInvoiceOut> outs = listByUuids(ids); List<BaseTDxRecordInvoiceOut> outs = listByUuids(ids);
Map<String, BaseTDxRecordInvoiceOut> outMap = Map<String, BaseTDxRecordInvoiceOut> outMap =

Loading…
Cancel
Save