|
@@ -208,4 +208,30 @@ public class CodeController extends BaseController {
|
|
|
bc.setResult(list.get(0));
|
|
|
return bc;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据所在地获取帮助信息
|
|
|
+ * @param szd
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public BusinessContext findHelpBySzd(CodeEntity szd){
|
|
|
+ BusinessContext bc = new BusinessContext();
|
|
|
+ List<PredicateModel> filterList = new ArrayList<PredicateModel>();
|
|
|
+ if(szd!=null){
|
|
|
+ addNotEmptyModel(filterList, "parent.id", szd.getByzd3(),
|
|
|
+ PredicateModel.Operator.EQ);
|
|
|
+ }
|
|
|
+ addNotEmptyModel(filterList, "groupcode", "HELP",
|
|
|
+ PredicateModel.Operator.EQ);
|
|
|
+ Specification<CodeEntity> spec = SpecificationCreater
|
|
|
+ .searchByPredicateModels(filterList);
|
|
|
+ List<CodeEntity> list = new ArrayList<CodeEntity>();
|
|
|
+ list = codeService.findAll(spec);
|
|
|
+ if(list !=null && list.size()>0){
|
|
|
+ bc.setResult(list.get(0));
|
|
|
+ } else{
|
|
|
+ bc.setResult(codeService.findOne(Constants.GGDM_ID_HELP));
|
|
|
+ }
|
|
|
+ return bc;
|
|
|
+ }
|
|
|
}
|