|
@@ -206,19 +206,22 @@ public class WbsTreeContractController extends BladeController {
|
|
|
parentId = primaryKeyId;
|
|
|
}
|
|
|
List<WbsTreeContractLazyVO> vos;
|
|
|
- String dataInfoId = "";
|
|
|
+ String dataInfoId;
|
|
|
if (("1").equals(classifyType)) {
|
|
|
dataInfoId = contractId + "_" + parentId + "_" + classifyType + "_" + tableOwner;
|
|
|
- }/* else {
|
|
|
- //监理合同段先不加缓存,存在问题
|
|
|
- dataInfoId = contractIdRelation + "_" + parentId + "_" + classifyType + "_" + tableOwner;
|
|
|
- }*/
|
|
|
+ } else {
|
|
|
+ /*// TODO 监理合同段先不加缓存,存在问题
|
|
|
+ dataInfoId = contractIdRelation + "_" + parentId + "_" + classifyType + "_" + tableOwner;*/
|
|
|
+
|
|
|
+ //定义一个错误id,暂时不加载缓存
|
|
|
+ dataInfoId = "illegalID";
|
|
|
+ }
|
|
|
Object data = redisTemplate.opsForValue().get("blade-manager::contract:wbstree:" + dataInfoId);
|
|
|
if (data != null) {
|
|
|
vos = JSON.parseArray(data.toString(), WbsTreeContractLazyVO.class);
|
|
|
} else {
|
|
|
- vos = iWbsTreeContractService.lazyQueryContractWbsTree(parentId, contractId, contractIdRelation, tableOwner);
|
|
|
- if (vos != null) {
|
|
|
+ vos = iWbsTreeContractService.lazyQueryContractWbsTree(parentId, contractId, contractIdRelation, tableOwner);
|
|
|
+ if (vos != null && !dataInfoId.equals("illegalID")) { //监理不缓存
|
|
|
JSONArray array = JSONArray.parseArray(JSON.toJSONString(vos));
|
|
|
redisTemplate.opsForValue().set("blade-manager::contract:wbstree:" + dataInfoId, JSON.toJSON(array).toString());
|
|
|
}
|