27 lines
716 B
JavaScript
27 lines
716 B
JavaScript
|
|
import { httpget } from '../../utils/request';
|
||
|
|
import apiurl from '../apiurl';
|
||
|
|
import { HDRealPromise } from './real';
|
||
|
|
|
||
|
|
|
||
|
|
export async function hdyjUnclose() {
|
||
|
|
const { data } = await httpget(apiurl.stwarnrecord.unclose) || {};
|
||
|
|
const ret = data || [];
|
||
|
|
|
||
|
|
const list = await HDRealPromise.get() || [];
|
||
|
|
ret.forEach(item => {
|
||
|
|
const record = list.find(o => o.stcd === item.stcd) || {};
|
||
|
|
item.adcd = record.adcd;
|
||
|
|
item.lgtd = record.lgtd;
|
||
|
|
item.lttd = record.lttd;
|
||
|
|
item.real = record;
|
||
|
|
});
|
||
|
|
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function hdyjLatestClosed() {
|
||
|
|
const { data } = await httpget(apiurl.stwarnrecord.find, { status: 3, page: 1, size: 10 }) || {};
|
||
|
|
const ret = data?.list || [];
|
||
|
|
|
||
|
|
return ret;
|
||
|
|
}
|