Browse Source

结报逻辑优化2

master
wanghongjun 11 months ago
parent
commit
871d0177cc
  1. 28
      app/service/invoice/InvoiceIssuanceService.php

28
app/service/invoice/InvoiceIssuanceService.php

@ -433,20 +433,22 @@ class InvoiceIssuanceService
$FinalReportData = new FinalReportData();
$save = [];
foreach ($daiZhengSummaryQuery['cxwjbList'] as $value) {
foreach ($value['cxwjbVO'] as $val) {
$sbpch = $val['sbpch']; // 申报批次号
$queryWhere = [
'frd_id' => $frd_id,
'sbpch' => $sbpch
];
$queryData = $FinalReportData->where($queryWhere)->field('id')->find();
if ($queryData) {
continue;
if (isset($daiZhengSummaryQuery['cxwjbList'])) {
foreach ($daiZhengSummaryQuery['cxwjbList'] as $value) {
foreach ($value['cxwjbVO'] as $val) {
$sbpch = $val['sbpch']; // 申报批次号
$queryWhere = [
'frd_id' => $frd_id,
'sbpch' => $sbpch
];
$queryData = $FinalReportData->where($queryWhere)->field('id')->find();
if ($queryData) {
continue;
}
$queryWhere['ydzse'] = $val['ydzse'];
$queryWhere['create_time'] = time();
$save[] = $queryWhere;
}
$queryWhere['ydzse'] = $val['ydzse'];
$queryWhere['create_time'] = time();
$save[] = $queryWhere;
}
}

Loading…
Cancel
Save