|
@@ -48,10 +48,12 @@ public class FormulaOptionServiceImpl extends ServiceImpl<FormulaOptionMapper, F
|
|
|
* 2)右键随机值融入说明:参数名RG 每个元素可以进行若干次右键,每次右键只要范围不跟已知的冲突就会保留,但这并不一定和表单最后保存的内容100%一样
|
|
|
* 如果要计算合格率或者模仿数据需要结合实际内容
|
|
|
* */
|
|
|
+ long start = System.currentTimeMillis();
|
|
|
if (StringUtils.isNotEmpty(contractId, parentId, pkeyId, key)) {
|
|
|
WbsTreeContract wbc = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getPKeyId, pkeyId));
|
|
|
- FormulaOption fo = this.getOne(Wrappers.<FormulaOption>lambdaQuery().eq(FormulaOption::getParentId, parentId).eq(FormulaOption::getContractId, contractId));
|
|
|
- if (fo != null && wbc != null) {
|
|
|
+ WbsTreeContract parent = this.wbsTreeContractService.getOne(Wrappers.<WbsTreeContract>lambdaQuery().eq(WbsTreeContract::getId, wbc.getParentId()).eq(WbsTreeContract::getContractId, wbc.getContractId()));
|
|
|
+ FormulaOption fo =this.getById(parent.getPKeyId());
|
|
|
+ if (fo != null) {
|
|
|
JSONObject jo = JSON.parseObject(fo.getVal());
|
|
|
if (jo.containsKey(wbc.getInitTableName())) {
|
|
|
JSONObject tableJson = jo.getJSONObject(wbc.getInitTableName());
|
|
@@ -61,6 +63,7 @@ public class FormulaOptionServiceImpl extends ServiceImpl<FormulaOptionMapper, F
|
|
|
JSONObject excel = tableJson.getJSONObject(cellKey);
|
|
|
if (excel.containsKey("TF")) {
|
|
|
/*暂时只有TF:是或否*/
|
|
|
+ System.out.println(this.getClass()+"参数查询耗时:"+(System.currentTimeMillis()-start)+"ms");
|
|
|
return excel.getString("TF");
|
|
|
}
|
|
|
}
|
|
@@ -69,6 +72,7 @@ public class FormulaOptionServiceImpl extends ServiceImpl<FormulaOptionMapper, F
|
|
|
JSONObject excel = tableJson.getJSONObject(key);
|
|
|
if (excel.containsKey("TF")) {
|
|
|
/*暂时只有TF:是或否*/
|
|
|
+ System.out.println(this.getClass()+"参数查询耗时:"+(System.currentTimeMillis()-start)+"ms");
|
|
|
return excel.getString("TF");
|
|
|
}
|
|
|
}
|