|
@@ -1037,25 +1037,39 @@
|
|
|
const new_yingsf_option_data = _.sortBy(yingsf_option_data, 'yearmonth');
|
|
|
for (const c4 of new_yingsf_option_data) {
|
|
|
show_yingsf_option_data.yearmonth.push(c4.yearmonth);
|
|
|
- if (!c4.had_ys) {
|
|
|
- const hadYsDatas = _.filter(new_yingsf_option_data, function (item) {
|
|
|
- return item.had_ys && item.yearmonth < c4.yearmonth;
|
|
|
- });
|
|
|
- // 找出最近的一个had_ys为true值
|
|
|
- if (hadYsDatas.length > 0) {
|
|
|
- c4.ys_tp = hadYsDatas[hadYsDatas.length - 1].ys_tp;
|
|
|
- }
|
|
|
+ const hadYsDatas = _.filter(new_yingsf_option_data, function (item) {
|
|
|
+ return item.yearmonth < c4.yearmonth;
|
|
|
+ });
|
|
|
+ // 找出最近的一个had_ys为true值
|
|
|
+ if (hadYsDatas.length > 0) {
|
|
|
+ c4.ys_tp = hadYsDatas[hadYsDatas.length - 1].ys_tp + c4.ys_tp;
|
|
|
}
|
|
|
+ // if (!c4.had_ys) {
|
|
|
+ // const hadYsDatas = _.filter(new_yingsf_option_data, function (item) {
|
|
|
+ // return item.had_ys && item.yearmonth < c4.yearmonth;
|
|
|
+ // });
|
|
|
+ // // 找出最近的一个had_ys为true值
|
|
|
+ // if (hadYsDatas.length > 0) {
|
|
|
+ // c4.ys_tp = hadYsDatas[hadYsDatas.length - 1].ys_tp;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
show_yingsf_option_data.ys_tp.push(c4.ys_tp);
|
|
|
- if (!c4.had_yf) {
|
|
|
- const hadYfDatas = _.filter(new_yingsf_option_data, function (item) {
|
|
|
- return item.had_yf && item.yearmonth < c4.yearmonth;
|
|
|
- });
|
|
|
- // 找出最近的一个had_yf为true值
|
|
|
- if (hadYfDatas.length > 0) {
|
|
|
- c4.yf_tp = hadYfDatas[hadYfDatas.length - 1].yf_tp;
|
|
|
- }
|
|
|
+ const hadYfDatas = _.filter(new_yingsf_option_data, function (item) {
|
|
|
+ return item.yearmonth < c4.yearmonth;
|
|
|
+ });
|
|
|
+ // 找出最近的一个had_yf为true值
|
|
|
+ if (hadYfDatas.length > 0) {
|
|
|
+ c4.yf_tp = hadYfDatas[hadYfDatas.length - 1].yf_tp + c4.yf_tp;
|
|
|
}
|
|
|
+ // if (!c4.had_yf) {
|
|
|
+ // const hadYfDatas = _.filter(new_yingsf_option_data, function (item) {
|
|
|
+ // return item.had_yf && item.yearmonth < c4.yearmonth;
|
|
|
+ // });
|
|
|
+ // // 找出最近的一个had_yf为true值
|
|
|
+ // if (hadYfDatas.length > 0) {
|
|
|
+ // c4.yf_tp = hadYfDatas[hadYfDatas.length - 1].yf_tp;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
show_yingsf_option_data.yf_tp.push(c4.yf_tp);
|
|
|
}
|
|
|
}
|
|
@@ -1080,25 +1094,39 @@
|
|
|
const new_yisf_option_data = _.sortBy(yisf_option_data, 'yearmonth');
|
|
|
for (const c4 of new_yisf_option_data) {
|
|
|
show_yisf_option_data.yearmonth.push(c4.yearmonth);
|
|
|
- if (!c4.had_ys) {
|
|
|
- const hadYsDatas = _.filter(new_yisf_option_data, function (item) {
|
|
|
- return item.had_ys && item.yearmonth < c4.yearmonth;
|
|
|
- });
|
|
|
- // 找出最近的一个had_ys为true值
|
|
|
- if (hadYsDatas.length > 0) {
|
|
|
- c4.ys_tp = hadYsDatas[hadYsDatas.length - 1].ys_tp;
|
|
|
- }
|
|
|
+ const hadYsDatas = _.filter(new_yisf_option_data, function (item) {
|
|
|
+ return item.yearmonth < c4.yearmonth;
|
|
|
+ });
|
|
|
+ // 找出最近的一个had_ys为true值
|
|
|
+ if (hadYsDatas.length > 0) {
|
|
|
+ c4.ys_tp = hadYsDatas[hadYsDatas.length - 1].ys_tp + c4.ys_tp;
|
|
|
}
|
|
|
+ // if (!c4.had_ys) {
|
|
|
+ // const hadYsDatas = _.filter(new_yisf_option_data, function (item) {
|
|
|
+ // return item.had_ys && item.yearmonth < c4.yearmonth;
|
|
|
+ // });
|
|
|
+ // // 找出最近的一个had_ys为true值
|
|
|
+ // if (hadYsDatas.length > 0) {
|
|
|
+ // c4.ys_tp = hadYsDatas[hadYsDatas.length - 1].ys_tp;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
show_yisf_option_data.ys_tp.push(c4.ys_tp);
|
|
|
- if (!c4.had_yf) {
|
|
|
- const hadYfDatas = _.filter(new_yisf_option_data, function (item) {
|
|
|
- return item.had_yf && item.yearmonth < c4.yearmonth;
|
|
|
- });
|
|
|
- // 找出最近的一个had_yf为true值
|
|
|
- if (hadYfDatas.length > 0) {
|
|
|
- c4.yf_tp = hadYfDatas[hadYfDatas.length - 1].yf_tp;
|
|
|
- }
|
|
|
+ const hadYfDatas = _.filter(new_yisf_option_data, function (item) {
|
|
|
+ return item.yearmonth < c4.yearmonth;
|
|
|
+ });
|
|
|
+ // 找出最近的一个had_yf为true值
|
|
|
+ if (hadYfDatas.length > 0) {
|
|
|
+ c4.yf_tp = hadYfDatas[hadYfDatas.length - 1].yf_tp + c4.yf_tp;
|
|
|
}
|
|
|
+ // if (!c4.had_yf) {
|
|
|
+ // const hadYfDatas = _.filter(new_yisf_option_data, function (item) {
|
|
|
+ // return item.had_yf && item.yearmonth < c4.yearmonth;
|
|
|
+ // });
|
|
|
+ // // 找出最近的一个had_yf为true值
|
|
|
+ // if (hadYfDatas.length > 0) {
|
|
|
+ // c4.yf_tp = hadYfDatas[hadYfDatas.length - 1].yf_tp;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
show_yisf_option_data.yf_tp.push(c4.yf_tp);
|
|
|
}
|
|
|
}
|