|
|
@@ -403,14 +403,18 @@ function getContent(coes) {
|
|
|
function prepareAss(assList) {//处理辅助定额,支持多个辅助定额的情况
|
|
|
for(let a of assList){
|
|
|
if(a.groupList && a.groupList.length > 1){//组里有多个定额的情况
|
|
|
- let newList = _.sortByAll(a.groupList,['param']);//先按参数排序
|
|
|
+ let newList = _.sortByAll(a.groupList,[function(item){
|
|
|
+ return parseFloat(item.param)
|
|
|
+ }]);//先按参数排序
|
|
|
+ let pre = 0;
|
|
|
for(let n of newList){
|
|
|
- if(a.actualValue > n.stdValue && a.actualValue <= parseFloat(n.param)){//落在中间,则用组里的这条定额
|
|
|
+ if(a.actualValue > pre && a.actualValue <= parseFloat(n.param)){//落在中间,则用组里的这条定额
|
|
|
a._doc.param = n.param;
|
|
|
a._doc.paramName = n.paramName;
|
|
|
a._doc.assistCode = n.assistCode;
|
|
|
break;
|
|
|
}
|
|
|
+ pre = parseFloat(n.param);
|
|
|
}
|
|
|
}
|
|
|
}
|